MCPcopy Create free account
hub / github.com/abess-team/abess / fwd_inv

Function fwd_inv

python/include/unsupported/doc/examples/FFT.cpp:75–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73
74template <typename T_time,typename T_freq>
75void fwd_inv(size_t nfft)
76{
77 typedef typename NumTraits<T_freq>::Real Scalar;
78 vector<T_time> timebuf(nfft);
79 RandomFill(timebuf);
80
81 vector<T_freq> freqbuf;
82 static FFT<Scalar> fft;
83 fft.fwd(freqbuf,timebuf);
84
85 vector<T_time> timebuf2;
86 fft.inv(timebuf2,freqbuf);
87
88 long double rmse = mag2(timebuf - timebuf2) / mag2(timebuf);
89 cout << "roundtrip rmse: " << rmse << endl;
90}
91
92template <typename T_scalar>
93void two_demos(int nfft)

Callers

nothing calls this directly

Calls 4

RandomFillFunction · 0.85
mag2Function · 0.85
fwdMethod · 0.45
invMethod · 0.45

Tested by

no test coverage detected