Edinburgh Speech Tools  2.1-release
vec_mat_aux_d.cc File Reference
#include <cstdlib>
#include "EST_DMatrix.h"
#include <climits>
#include "EST_math.h"
#include "EST_unix.h"
Include dependency graph for vec_mat_aux_d.cc:

Go to the source code of this file.

Functions

bool polynomial_fit (EST_DVector &x, EST_DVector &y, EST_DVector &co_effs, int order)
 least squares fit More...
 
bool polynomial_fit (EST_DVector &x, EST_DVector &y, EST_DVector &co_effs, EST_DVector &weights, int order)
 weighted least squares fit More...
 
double matrix_max (const EST_DMatrix &a)
 
int square (const EST_DMatrix &a)
 
double sum (const EST_DMatrix &a)
 sum of elements More...
 
EST_DMatrix diagonalise (const EST_DMatrix &a)
 extract leading diagonal as a matrix More...
 
void inplace_diagonalise (EST_DMatrix &a)
 inplace diagonalise More...
 
EST_DMatrix sub (const EST_DMatrix &a, ssize_t row, ssize_t col)
 
EST_DMatrix row (const EST_DMatrix &a, ssize_t row)
 
EST_DMatrix column (const EST_DMatrix &a, ssize_t col)
 
EST_DMatrix triangulate (const EST_DMatrix &a)
 
void transpose (const EST_DMatrix &a, EST_DMatrix &b)
 exchange rows and columns More...
 
EST_DMatrix backwards (EST_DMatrix &a)
 
EST_DMatrix DMatrix_abs (const EST_DMatrix &a)
 
int inverse (const EST_DMatrix &a, EST_DMatrix &inv)
 inverse More...
 
int inverse (const EST_DMatrix &a, EST_DMatrix &inv, int &singularity)
 
int pseudo_inverse (const EST_DMatrix &a, EST_DMatrix &inv)
 pseudo inverse (for non-square matrices) More...
 
int pseudo_inverse (const EST_DMatrix &a, EST_DMatrix &inv, int &singularity)
 
double determinant (const EST_DMatrix &a)
 
void eye (EST_DMatrix &a, const int n)
 some useful matrix creators make an identity matrix of dimension n More...
 
void eye (EST_DMatrix &a)
 make already square matrix into I without resizing More...
 
EST_DVector add (const EST_DVector &a, const EST_DVector &b)
 elementwise add More...
 
EST_DVector subtract (const EST_DVector &a, const EST_DVector &b)
 elementwise subtract More...
 
EST_DVector diagonal (const EST_DMatrix &a)
 extract leading diagonal as a vector More...
 
double polynomial_value (const EST_DVector &coeffs, const double x)
 
void symmetrize (EST_DMatrix &a)
 enforce symmetry More...
 
void stack_matrix (const EST_DMatrix &M, EST_DVector &v)
 stack columns on top of each other to make a vector More...
 
void make_random_matrix (EST_DMatrix &M, const double scale)
 all elements are randomised More...
 
void make_random_vector (EST_DVector &V, const double scale)
 all elements are randomised More...
 
void make_random_symmetric_matrix (EST_DMatrix &M, const double scale)
 used for covariance More...
 
void make_random_diagonal_matrix (EST_DMatrix &M, const double scale)
 used for variance More...
 
void make_poly_basis_function (EST_DMatrix &T, EST_DVector t)
 
int floor_matrix (EST_DMatrix &M, const double floor)
 
EST_DMatrix cov_prod (const EST_DVector &v1, const EST_DVector &v2)
 matrix product of two vectors (#rows = length of first vector, #cols = length of second vector) More...
 

Function Documentation

bool polynomial_fit ( EST_DVector x,
EST_DVector y,
EST_DVector co_effs,
int  order 
)

least squares fit

Definition at line 47 of file vec_mat_aux_d.cc.

bool polynomial_fit ( EST_DVector x,
EST_DVector y,
EST_DVector co_effs,
EST_DVector weights,
int  order 
)

weighted least squares fit

Definition at line 58 of file vec_mat_aux_d.cc.

double matrix_max ( const EST_DMatrix a)

Definition at line 132 of file vec_mat_aux_d.cc.

int square ( const EST_DMatrix a)

Definition at line 145 of file vec_mat_aux_d.cc.

double sum ( const EST_DMatrix a)

sum of elements

Definition at line 150 of file vec_mat_aux_d.cc.

EST_DMatrix diagonalise ( const EST_DMatrix a)

extract leading diagonal as a matrix

Definition at line 161 of file vec_mat_aux_d.cc.

void inplace_diagonalise ( EST_DMatrix a)

inplace diagonalise

Definition at line 179 of file vec_mat_aux_d.cc.

EST_DMatrix sub ( const EST_DMatrix a,
ssize_t  row,
ssize_t  col 
)

Definition at line 190 of file vec_mat_aux_d.cc.

EST_DMatrix row ( const EST_DMatrix a,
ssize_t  row 
)

Definition at line 213 of file vec_mat_aux_d.cc.

EST_DMatrix column ( const EST_DMatrix a,
ssize_t  col 
)

Definition at line 224 of file vec_mat_aux_d.cc.

EST_DMatrix triangulate ( const EST_DMatrix a)

Definition at line 235 of file vec_mat_aux_d.cc.

void transpose ( const EST_DMatrix a,
EST_DMatrix b 
)

exchange rows and columns

Definition at line 247 of file vec_mat_aux_d.cc.

EST_DMatrix backwards ( EST_DMatrix a)

Definition at line 257 of file vec_mat_aux_d.cc.

EST_DMatrix DMatrix_abs ( const EST_DMatrix a)

Definition at line 273 of file vec_mat_aux_d.cc.

int inverse ( const EST_DMatrix a,
EST_DMatrix inv 
)

inverse

Definition at line 301 of file vec_mat_aux_d.cc.

int inverse ( const EST_DMatrix a,
EST_DMatrix inv,
int singularity 
)

Definition at line 307 of file vec_mat_aux_d.cc.

int pseudo_inverse ( const EST_DMatrix a,
EST_DMatrix inv 
)

pseudo inverse (for non-square matrices)

Definition at line 409 of file vec_mat_aux_d.cc.

int pseudo_inverse ( const EST_DMatrix a,
EST_DMatrix inv,
int singularity 
)

Definition at line 415 of file vec_mat_aux_d.cc.

double determinant ( const EST_DMatrix a)

Definition at line 440 of file vec_mat_aux_d.cc.

void eye ( EST_DMatrix a,
const int  n 
)

some useful matrix creators make an identity matrix of dimension n

Definition at line 477 of file vec_mat_aux_d.cc.

void eye ( EST_DMatrix a)

make already square matrix into I without resizing

Definition at line 490 of file vec_mat_aux_d.cc.

EST_DVector add ( const EST_DVector a,
const EST_DVector b 
)

elementwise add

Definition at line 505 of file vec_mat_aux_d.cc.

EST_DVector subtract ( const EST_DVector a,
const EST_DVector b 
)

elementwise subtract

Definition at line 526 of file vec_mat_aux_d.cc.

EST_DVector diagonal ( const EST_DMatrix a)

extract leading diagonal as a vector

Definition at line 547 of file vec_mat_aux_d.cc.

double polynomial_value ( const EST_DVector coeffs,
const double  x 
)

Definition at line 564 of file vec_mat_aux_d.cc.

void symmetrize ( EST_DMatrix a)

enforce symmetry

Definition at line 574 of file vec_mat_aux_d.cc.

void stack_matrix ( const EST_DMatrix M,
EST_DVector v 
)

stack columns on top of each other to make a vector

Definition at line 598 of file vec_mat_aux_d.cc.

void make_random_matrix ( EST_DMatrix M,
const double  scale 
)

all elements are randomised

Definition at line 609 of file vec_mat_aux_d.cc.

void make_random_vector ( EST_DVector V,
const double  scale 
)

all elements are randomised

Definition at line 622 of file vec_mat_aux_d.cc.

void make_random_symmetric_matrix ( EST_DMatrix M,
const double  scale 
)

used for covariance

Definition at line 634 of file vec_mat_aux_d.cc.

void make_random_diagonal_matrix ( EST_DMatrix M,
const double  scale 
)

used for variance

Definition at line 654 of file vec_mat_aux_d.cc.

void make_poly_basis_function ( EST_DMatrix T,
EST_DVector  t 
)

Definition at line 670 of file vec_mat_aux_d.cc.

int floor_matrix ( EST_DMatrix M,
const double  floor 
)

Definition at line 686 of file vec_mat_aux_d.cc.

EST_DMatrix cov_prod ( const EST_DVector v1,
const EST_DVector v2 
)

matrix product of two vectors (#rows = length of first vector, #cols = length of second vector)

Definition at line 700 of file vec_mat_aux_d.cc.