23 #ifndef COM_DAFER45_TBTK_CONVOLVER
24 #define COM_DAFER45_TBTK_CONVOLVER
40 template<
typename DataType>
53 template<
typename DataType>
61 template<
typename DataType>
66 const std::vector<unsigned int> &ranges0 = array0.
getRanges();
67 const std::vector<unsigned int> &ranges1 = array1.
getRanges();
69 ranges0.size() == ranges1.size(),
70 "Convolver::convolve()",
71 "Incompatible ranges. The ranges must be equal, but array0 has"
72 <<
" '" << ranges0.size() <<
"' range parameters, while array1"
73 <<
" has '" << ranges1.size() <<
"' range parameters.",
77 for(
unsigned int n = 0; n < ranges0.size(); n++){
79 ranges0[n] == ranges1[n],
80 "Convolver::convolve()",
81 "Incompatible ranges. The ranges must be equal, but"
82 <<
" range '" << n <<
"' is '" << ranges0[n] <<
"' for"
83 <<
" array0, while it is '" << ranges1[n] <<
"' for"
111 for(
unsigned int n = 0; n < result.
getSize(); n++)
112 result[n] = array0Out[n]*array1Out[n];
123 for(
unsigned int n = 0; n < result.
getSize(); n++)
129 template<
typename DataType>
134 const std::vector<unsigned int> &ranges0 = array0.
getRanges();
135 const std::vector<unsigned int> &ranges1 = array1.
getRanges();
137 ranges0.size() == ranges1.size(),
138 "Convolver::crossCorrelate()",
139 "Incompatible ranges. The ranges must be equal, but array0 has"
140 <<
" '" << ranges0.size() <<
"' range parameters, while array1"
141 <<
" has '" << ranges1.size() <<
"' range parameters.",
145 for(
unsigned int n = 0; n < ranges0.size(); n++){
147 ranges0[n] == ranges1[n],
148 "Convolver::crossCorrelate()",
149 "Incompatible ranges. The ranges must be equal, but"
150 <<
" range '" << n <<
"' is '" << ranges0[n] <<
"' for"
151 <<
" array0, while it is '" << ranges1[n] <<
"' for"
179 for(
unsigned int n = 0; n < result.
getSize(); n++)
180 result[n] = conj(array0Out[n])*array1Out[n];
191 for(
unsigned int n = 0; n < result.
getSize(); n++)