26 #ifndef KALDI_MATRIX_MATRIX_FUNCTIONS_H_ 27 #define KALDI_MATRIX_MATRIX_FUNCTIONS_H_ 64 template<
typename Real>
void ComplexFft (VectorBase<Real> *v,
bool forward, Vector<Real> *tmp_work = NULL);
69 template<
typename Real>
void ComplexFt (
const VectorBase<Real> &in,
70 VectorBase<Real> *out,
bool forward);
84 template<
typename Real>
void RealFft (VectorBase<Real> *v,
bool forward);
109 template<
typename Real>
inline void ComplexMul(
const Real &a_re,
const Real &a_im,
110 Real *b_re, Real *b_im);
113 template<
typename Real>
inline void ComplexAddProduct(
const Real &a_re,
const Real &a_im,
114 const Real &b_re,
const Real &b_im,
115 Real *c_re, Real *c_im);
119 template<
typename Real>
inline void ComplexImExp(Real x, Real *a_re, Real *a_im);
142 template<
typename Real>
146 bool print_eigs =
false,
153 template<
typename Real>
155 const VectorBase<Real> &a,
156 const VectorBase<Real> &b,
157 MatrixBase<Real> *plus,
158 MatrixBase<Real> *minus);
160 template<
typename Real1,
typename Real2>
This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for...
void RealFftInefficient(VectorBase< Real > *v, bool forward)
Inefficient version of Fourier transform, for testing purposes.
MatrixIndexT NumCols() const
Returns number of columns (or zero for empty matrix).
Base class which provides matrix operations not involving resizing or allocation. ...
void ComputeDctMatrix(Matrix< Real > *M)
ComputeDctMatrix computes a matrix corresponding to the DCT, such that M * v equals the DCT of vector...
void ComplexFt(const VectorBase< Real > &in, VectorBase< Real > *out, bool forward)
ComplexFt is the same as ComplexFft but it implements the Fourier transform in an inefficient way...
void ComplexAddProduct(const Real &a_re, const Real &a_im, const Real &b_re, const Real &b_im, Real *c_re, Real *c_im)
ComplexMul implements, inline, the complex operation c += (a * b).
void AssertSameDim(const MatrixBase< Real1 > &mat1, const MatrixBase< Real2 > &mat2)
void ComputePca(const MatrixBase< Real > &X, MatrixBase< Real > *U, MatrixBase< Real > *A, bool print_eigs, bool exact)
ComputePCA does a PCA computation, using either outer products or inner products, whichever is more e...
void ComplexMul(const Real &a_re, const Real &a_im, Real *b_re, Real *b_im)
ComplexMul implements, inline, the complex multiplication b *= a.
void AddOuterProductPlusMinus(Real alpha, const VectorBase< Real > &a, const VectorBase< Real > &b, MatrixBase< Real > *plus, MatrixBase< Real > *minus)
void ComplexFft(VectorBase< Real > *v, bool forward, Vector< Real > *tmp_in)
The function ComplexFft does an Fft on the vector argument v.
#define KALDI_ASSERT(cond)
MatrixIndexT NumRows() const
Returns number of rows (or zero for empty matrix).
void ComplexImExp(Real x, Real *a_re, Real *a_im)
ComplexImExp implements a <– exp(i x), inline.
void RealFft(VectorBase< Real > *v, bool forward)
RealFft is a fourier transform of real inputs.