📄 cbitrev_t.cpp
字号:
//
// File = cbitrev_T.cpp
//
#include "cbitrev_T.h"
using std::complex;
template <class T>
void ComplexBitReverse( complex<T> *array, int size)
{
complex<T> tt;
int nv2, nm1, i, j, k;
nv2 = size/2;
nm1 = size - 1;
j=0;
for (i=0; i<nm1; i++)
{
if (i<j)
{
tt = array[j];
array[j] = array[i];
array[i] = tt;
}
k = nv2;
while (k<=j)
{
j -= k;
k /= 2;
}
j += k;
}
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
template void ComplexBitReverse<double>( complex<double> *array, int size);
template void ComplexBitReverse<float>( complex<float> *array, int size);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -