/usr/include/ITK-4.12/vnl/vnl_complexify.h is in libinsighttoolkit4-dev 4.12.2-dfsg1-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 | // This is core/vnl/vnl_complexify.h
#ifndef vnl_complexify_h_
#define vnl_complexify_h_
//:
// \file
// \brief Functions to create complex vectors and matrices from real ones
// \author fsm
//
// \verbatim
// Modifications
// Peter Vanroose - 2 July 2002 - part of vnl_complex_ops.h moved here
// \endverbatim
#include <complex>
#include <vcl_compiler.h>
#include <vnl/vnl_vector.h>
#include <vnl/vnl_vector_fixed.h>
#include <vnl/vnl_matrix.h>
#include <vnl/vnl_matrix_fixed.h>
#include <vnl/vnl_diag_matrix.h>
#include <vnl/vnl_diag_matrix_fixed.h>
#include <vnl/vnl_sym_matrix.h>
#include "vnl/vnl_export.h"
//: Overwrite complex array C (of length n) with pairs from real arrays R and I.
template <class T> VNL_TEMPLATE_EXPORT
void
vnl_complexify(T const* R, T const* I, std::complex<T>* C, unsigned n);
//: Overwrite complex array C (sz n) with complexified version of real array R.
template <class T> VNL_TEMPLATE_EXPORT
void
vnl_complexify(T const* R, std::complex<T>* C, unsigned n);
// Real Alone:
// - vnl_vector
// - vnl_vector_fixed
// - vnl_matrix
// - vnl_matrix_fixed
// - vnl_diag_matrix
// - vnl_diag_matrix_fixed
// - vnl_sym_matrix
//: Return complexified version of real vector R.
// \relatesalso vnl_vector
template <class T> VNL_TEMPLATE_EXPORT
vnl_vector<std::complex<T> >
vnl_complexify(vnl_vector<T> const& R);
//: Return complexified version of real fixed vector R.
// \relatesalso vnl_vector_fixed
template <class T, unsigned int n> VNL_TEMPLATE_EXPORT
vnl_vector_fixed<std::complex<T>,n>
vnl_complexify(vnl_vector_fixed<T,n> const& R)
{
vnl_vector_fixed<std::complex<T>,n> C;
vnl_complexify(R.begin(), C.begin(), R.size());
return C;
}
//: Return complexified version of real matrix R.
// \relatesalso vnl_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_matrix<std::complex<T> >
vnl_complexify(vnl_matrix<T> const& R);
//: Return complexified version of real fixed matrix R.
// \relatesalso vnl_matrix_fixed
template <class T, unsigned int r, unsigned int c> VNL_TEMPLATE_EXPORT
vnl_matrix_fixed<std::complex<T>,r,c >
vnl_complexify(vnl_matrix_fixed<T,r,c> const& R)
{
vnl_matrix_fixed<std::complex<T>,r,c> C;
vnl_complexify(R.begin(), C.begin(), R.size());
return C;
}
//: Return complexified version of real diagonal matrix R.
// \relatesalso vnl_diag_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_diag_matrix<std::complex<T> >
vnl_complexify(vnl_diag_matrix<T> const& R);
//: Return complexified version of real fixed diagonal matrix R.
// \relatesalso vnl_diag_matrix_fixed
template <class T, unsigned int n> VNL_TEMPLATE_EXPORT
vnl_diag_matrix_fixed<std::complex<T>,n >
vnl_complexify(vnl_diag_matrix_fixed<T,n> const& R)
{
vnl_diag_matrix_fixed<std::complex<T>,n> C;
vnl_complexify(R.begin(), C.begin(), R.size());
return C;
}
//: Return complexified version of real symmetric matrix R.
// \relatesalso vnl_sym_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_sym_matrix<std::complex<T> >
vnl_complexify(vnl_sym_matrix<T> const& R);
//----------------------------------------------------------------------
// Real + Imaginary:
// - vnl_vector
// - vnl_vector_fixed
// - vnl_matrix
// - vnl_matrix_fixed
// - vnl_diag_matrix
// - vnl_diag_matrix_fixed
// - vnl_sym_matrix
//: Return complex vector R+j*I from two real vectors R and I.
// \relatesalso vnl_vector
template <class T> VNL_TEMPLATE_EXPORT
vnl_vector<std::complex<T> >
vnl_complexify(vnl_vector<T> const& R, vnl_vector<T> const& I);
//: Return complex fixed vector R+j*I from two real fixed vectors R and I.
// \relatesalso vnl_vector_fixed
template <class T, unsigned int n> VNL_TEMPLATE_EXPORT
vnl_vector_fixed<std::complex<T>,n >
vnl_complexify(vnl_vector_fixed<T,n> const& R, vnl_vector_fixed<T,n> const& I)
{
vnl_vector_fixed<std::complex<T>,n > C;
vnl_complexify(R.begin(), I.begin(), C.begin(), R.size());
return C;
}
//: Return complex matrix R+j*I from two real matrices R and I.
// \relatesalso vnl_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_matrix<std::complex<T> >
vnl_complexify(vnl_matrix<T> const& R, vnl_matrix<T> const& I);
//: Return complex fixed matrix R+j*I from two real fixed matrices R and I.
// \relatesalso vnl_matrix_fixed
template <class T, unsigned int r, unsigned int c> VNL_TEMPLATE_EXPORT
vnl_matrix_fixed<std::complex<T >,r,c>
vnl_complexify(vnl_matrix_fixed<T,r,c> const& R, vnl_matrix_fixed<T,r,c> const& I)
{
vnl_matrix_fixed<std::complex<T>,r,c > C;
vnl_complexify(R.begin(), I.begin(), C.begin(), R.size());
return C;
}
//: Return complex diagonal matrix R+j*I from two real diagonal matrices R and I.
// \relatesalso vnl_diag_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_diag_matrix<std::complex<T> >
vnl_complexify(vnl_diag_matrix<T> const& R, vnl_diag_matrix<T> const& I);
//: Return complex fixed diagonal matrix R+j*I from two real fixed diagonal matrices R and I.
// \relatesalso vnl_matrix_fixed
template <class T, unsigned int n> VNL_TEMPLATE_EXPORT
vnl_diag_matrix_fixed<std::complex<T>,n>
vnl_complexify(vnl_diag_matrix_fixed<T,n> const& R, vnl_diag_matrix_fixed<T,n> const& I)
{
vnl_diag_matrix_fixed<std::complex<T>,n > C;
vnl_complexify(R.begin(), I.begin(), C.begin(), R.size());
return C;
}
//: Return complex diagonal matrix R+j*I from two real diagonal matrices R and I.
// \relatesalso vnl_diag_matrix
template <class T> VNL_TEMPLATE_EXPORT
vnl_sym_matrix<std::complex<T> >
vnl_complexify(vnl_sym_matrix<T> const& R, vnl_sym_matrix<T> const& I);
#endif // vnl_complexify_h_
|