sparse-matrix.cc File Reference
#include <algorithm>
#include <limits>
#include <string>
#include "matrix/sparse-matrix.h"
#include "matrix/kaldi-matrix.h"
Include dependency graph for sparse-matrix.cc:

Go to the source code of this file.

Classes

struct  CompareFirst< Real >
 

Namespaces

 kaldi
 This code computes Goodness of Pronunciation (GOP) and extracts phone-level pronunciation feature for mispronunciations detection tasks, the reference:
 
 kaldi::sparse_vector_utils
 

Functions

template<typename Real >
Real VecSvec (const VectorBase< Real > &vec, const SparseVector< Real > &svec)
 
template float VecSvec (const VectorBase< float > &vec, const SparseVector< float > &svec)
 
template double VecSvec (const VectorBase< double > &vec, const SparseVector< double > &svec)
 
template<typename Real >
Real TraceMatSmat (const MatrixBase< Real > &A, const SparseMatrix< Real > &B, MatrixTransposeType trans)
 
template float TraceMatSmat (const MatrixBase< float > &A, const SparseMatrix< float > &B, MatrixTransposeType trans)
 
template double TraceMatSmat (const MatrixBase< double > &A, const SparseMatrix< double > &B, MatrixTransposeType trans)
 
void AppendGeneralMatrixRows (const std::vector< const GeneralMatrix * > &src, GeneralMatrix *mat)
 Appends all the matrix rows of a list of GeneralMatrixes, to get a single GeneralMatrix. More...
 
void FilterCompressedMatrixRows (const CompressedMatrix &in, const std::vector< bool > &keep_rows, Matrix< BaseFloat > *out)
 Outputs a Matrix<Real> containing only the rows r of "in" such that keep_rows[r] == true. More...
 
template<typename Real >
void FilterMatrixRows (const Matrix< Real > &in, const std::vector< bool > &keep_rows, Matrix< Real > *out)
 Outputs a Matrix<Real> containing only the rows r of "in" such that keep_keep_rows[r] == true. More...
 
template void FilterMatrixRows (const Matrix< float > &in, const std::vector< bool > &keep_rows, Matrix< float > *out)
 
template void FilterMatrixRows (const Matrix< double > &in, const std::vector< bool > &keep_rows, Matrix< double > *out)
 
template<typename Real >
void FilterSparseMatrixRows (const SparseMatrix< Real > &in, const std::vector< bool > &keep_rows, SparseMatrix< Real > *out)
 Outputs a SparseMatrix<Real> containing only the rows r of "in" such that keep_rows[r] == true. More...
 
template void FilterSparseMatrixRows (const SparseMatrix< float > &in, const std::vector< bool > &keep_rows, SparseMatrix< float > *out)
 
template void FilterSparseMatrixRows (const SparseMatrix< double > &in, const std::vector< bool > &keep_rows, SparseMatrix< double > *out)
 
void FilterGeneralMatrixRows (const GeneralMatrix &in, const std::vector< bool > &keep_rows, GeneralMatrix *out)
 Outputs a GeneralMatrix containing only the rows r of "in" such that keep_rows[r] == true. More...
 
void ExtractRowRangeWithPadding (const GeneralMatrix &in, int32 row_offset, int32 num_rows, GeneralMatrix *out)
 This function extracts a row-range of a GeneralMatrix and writes as a GeneralMatrix containing the same type of underlying matrix. More...