00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059 #pragma once
00060 #ifndef ANALYSIS_H
00061 #define ANALYSIS_H
00062
00063 #include "./cimpl.h"
00064 using namespace CIMPL;
00065
00066 #include "./IO.h"
00067
00068
00069 #include <time.h>
00070
00071 using namespace MathCore;
00072 using namespace IO;
00073
00074
00076 namespace Analysis
00077 {
00078 void StatusDisplay(long status);
00079
00080
00081 enum Border
00082 {
00083 ZeroPad,
00084 Symmetric,
00085 Replicate,
00086 Circular
00087 };
00088
00089 enum FilterArea
00090 {
00091 Full,
00092 Same,
00093 Valid
00094 };
00095
00096 Vector<ComplexFloat> FFT(Vector<ComplexFloat>& x);
00097 Vector<ComplexFloat>& FFTI(Vector<ComplexFloat>& x);
00098 Vector<ComplexDouble> FFT(Vector<ComplexDouble>& x);
00099 Vector<ComplexDouble>& FFTI(Vector<ComplexDouble>& x);
00100 Vector<ComplexFloat> FFT(Vector<float>& x);
00101 Vector<ComplexDouble> FFT(Vector<double>& x);
00102
00103 Vector<ComplexFloat> IFFT(Vector<ComplexFloat>& x);
00104 Vector<ComplexFloat>& IFFTI(Vector<ComplexFloat>& x);
00105 Vector<ComplexDouble> IFFT(Vector<ComplexDouble>& x);
00106 Vector<ComplexDouble>& IFFTI(Vector<ComplexDouble>& x);
00107
00108 Matrix<ComplexFloat> FFT2(Matrix<ComplexFloat>& x);
00109 Matrix<ComplexFloat>& FFT2I(Matrix<ComplexFloat>& x);
00110 Matrix<ComplexDouble> FFT2(Matrix<ComplexDouble>& x);
00111 Matrix<ComplexDouble>& FFT2I(Matrix<ComplexDouble>& x);
00112
00113 Matrix<ComplexFloat> IFFT2(Matrix<ComplexFloat>& x);
00114 Matrix<ComplexFloat>& IFFT2I(Matrix<ComplexFloat>& x);
00115 Matrix<ComplexDouble> IFFT2(Matrix<ComplexDouble>& x);
00116 Matrix<ComplexDouble>& IFFT2I(Matrix<ComplexDouble>& x);
00117
00118
00119 Vector<float> Conv(Vector<float>& input, Vector<float>& filter, FilterArea fa = Full, Border b = ZeroPad, bool PowerOfTwo = true);
00120 Vector<double> Conv(Vector<double>& input, Vector<double>& filter, FilterArea fa = Full, Border b = ZeroPad, bool PowerOfTwo = true);
00121 Vector<ComplexFloat> Conv(Vector<ComplexFloat>& input, Vector<ComplexFloat>& filter, FilterArea fa = Full, Border b = ZeroPad, bool PowerOfTwo = true);
00122 Vector<ComplexDouble> Conv(Vector<ComplexDouble>& input, Vector<ComplexDouble>& filter, FilterArea fa = Full, Border b = ZeroPad, bool PowerOfTwo = true);
00123
00124
00125 Matrix<float> Conv2(Matrix<float>& input, Matrix<float>& filter, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00126 Matrix<float> Conv2(Vector<float>& filter1, Vector<float>& filter2, Matrix<float>& input, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00127 Matrix<double> Conv2(Matrix<double>& input, Matrix<double>& filter, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00128 Matrix<double> Conv2(Vector<double>& filter1, Vector<double>& filter2, Matrix<double>& input, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00129 Matrix<ComplexFloat> Conv2(Matrix<ComplexFloat>& input, Matrix<ComplexFloat>& filter, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00130 Matrix<ComplexFloat> Conv2(Vector<ComplexFloat>& filter1, Vector<ComplexFloat>& filter2, Matrix<ComplexFloat>& input, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00131 Matrix<ComplexDouble> Conv2(Matrix<ComplexDouble>& input, Matrix<ComplexDouble>& filter, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00132 Matrix<ComplexDouble> Conv2(Vector<ComplexDouble>& filter1, Vector<ComplexDouble>& filter2, Matrix<ComplexDouble>& input, FilterArea fa = Same, Border b=Symmetric, bool PowerOfTwo = true);
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
00147
00148
00149
00150 };
00151
00152
00153
00154
00155
00156
00157
00158 #endif
00159
00160
00161
00162
00163
00164
00165