Home | History | Annotate | Download | only in Eigen

Lines Matching full:nfft

122   fft_fwd_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}
142 fft_inv_proxy(const T_SrcMat& src,T_FftIfc & fft, Index nfft) : m_src(src),m_ifc(fft), m_nfft(nfft) {}
187 void fwd( Complex * dst, const Scalar * src, Index nfft)
189 m_impl.fwd(dst,src,static_cast<int>(nfft));
191 ReflectSpectrum(dst,nfft);
195 void fwd( Complex * dst, const Complex * src, Index nfft)
197 m_impl.fwd(dst,src,static_cast<int>(nfft));
221 void fwd( MatrixBase<ComplexDerived> & dst, const MatrixBase<InputDerived> & src, Index nfft=-1)
233 if (nfft<1)
234 nfft = src.size();
237 dst.derived().resize( (nfft>>1)+1);
239 dst.derived().resize(nfft);
241 if ( src.innerStride() != 1 || src.size() < nfft ) {
243 if (src.size()<nfft) {
244 tmp.setZero(nfft);
249 fwd( &dst[0],&tmp[0],nfft );
251 fwd( &dst[0],&src[0],nfft );
258 fwd( const MatrixBase<InputDerived> & src, Index nfft=-1)
260 return fft_fwd_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );
266 inv( const MatrixBase<InputDerived> & src, Index nfft=-1)
268 return fft_inv_proxy< MatrixBase<InputDerived> ,FFT<T_Scalar,T_Impl> >( src, *this,nfft );
272 void inv( Complex * dst, const Complex * src, Index nfft)
274 m_impl.inv( dst,src,static_cast<int>(nfft) );
276 scale(dst,Scalar(1./nfft),nfft); // scale the time series
280 void inv( Scalar * dst, const Complex * src, Index nfft)
282 m_impl.inv( dst,src,static_cast<int>(nfft) );
284 scale(dst,Scalar(1./nfft),nfft); // scale the time series
289 void inv( MatrixBase<OutputDerived> & dst, const MatrixBase<ComplexDerived> & src, Index nfft=-1)
302 if (nfft<1) { //automatic FFT size determination
304 nfft = 2*(src.size()-1); //assume even fft size
306 nfft = src.size();
308 dst.derived().resize( nfft );
310 // check for nfft that does not fit the input data size
312 ? ( (nfft/2+1) - src.size() )
313 : ( nfft - src.size() );
332 tmp(nhead) = ( src(nfft/2) + src( src.size() - nfft/2 ) )*src_type(.5);
341 inv( &dst[0],&tmp[0], nfft);
343 inv( &dst[0],&src[0], nfft);
349 void inv( std::vector<_Output> & dst, const std::vector<Complex> & src,Index nfft=-1)
351 if (nfft<1)
352 nfft = ( NumTraits<_Output>::IsComplex == 0 && HasFlag(HalfSpectrum) ) ? 2*(src.size()-1) : src.size();
353 dst.resize( nfft );
354 inv( &dst[0],&src[0],nfft);
390 void ReflectSpectrum(Complex * freq, Index nfft)
393 Index nhbins=(nfft>>1)+1;
394 for (Index k=nhbins;k < nfft; ++k )
395 freq[k] = conj(freq[nfft-k]);