Edinburgh Speech Tools  2.1-release
EST_DMatrix.h File Reference
#include <cstddef>
#include "EST_TSimpleMatrix.h"
#include "EST_TSimpleVector.h"
#include "EST_FMatrix.h"
Include dependency graph for EST_DMatrix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EST_DMatrix
 
class  EST_DVector
 A vector class for double precision floating point numbers. EST_DVector x should be used instead of float *x wherever possible. More...
 

Functions

int square (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)
 
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...
 
void est_seed ()
 the user should use est_seed to seed the random number generator More...
 
void est_seed48 ()
 
void make_random_vector (EST_DVector &M, const double scale)
 all elements are randomised More...
 
void make_random_matrix (EST_DMatrix &M, const double scale)
 all elements are randomised More...
 
void make_random_diagonal_matrix (EST_DMatrix &M, const double scale)
 used for variance More...
 
void make_random_symmetric_matrix (EST_DMatrix &M, const double scale)
 used for covariance More...
 
void make_poly_basis_function (EST_DMatrix &T, EST_DVector t)
 
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...
 
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 inplace_diagonalise (EST_DMatrix &a)
 inplace diagonalise More...
 
double determinant (const EST_DMatrix &a)
 
int singular (EST_DMatrix &a)
 not implemented ?? More...
 
void transpose (const EST_DMatrix &a, EST_DMatrix &b)
 exchange rows and columns More...
 
EST_DMatrix triangulate (const EST_DMatrix &a)
 
EST_DMatrix diagonalise (const EST_DMatrix &a)
 extract leading diagonal as a matrix More...
 
EST_DVector diagonal (const EST_DMatrix &a)
 extract leading diagonal as a vector More...
 
double sum (const EST_DMatrix &a)
 sum of elements More...
 
void multiply (const EST_DMatrix &a, const EST_DMatrix &b, EST_DMatrix &c)
 
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...
 
EST_DMatrix operator* (const EST_DMatrix &a, const EST_DMatrix &b)
 
EST_DMatrix operator- (const EST_DMatrix &a, const EST_DMatrix &b)
 
EST_DMatrix operator+ (const EST_DMatrix &a, const EST_DMatrix &b)
 
EST_DVector operator- (const EST_DVector &a, const EST_DVector &b)
 
EST_DVector operator+ (const EST_DVector &a, const EST_DVector &b)
 
EST_DMatrix sub (const EST_DMatrix &a, ssize_t row, ssize_t col)
 
EST_DMatrix DMatrix_abs (const EST_DMatrix &a)
 
EST_DMatrix row (const EST_DMatrix &a, ssize_t row)
 
EST_DMatrix column (const EST_DMatrix &a, ssize_t col)
 
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 polynomial_value (const EST_DVector &coeffs, const double x)
 
double operator* (const EST_DVector &v1, const EST_DVector &v2)
 vector dot product More...
 

Function Documentation

int square ( const EST_DMatrix a)

Definition at line 145 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.

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.

void est_seed ( )

the user should use est_seed to seed the random number generator

Definition at line 705 of file vec_mat_aux.cc.

void est_seed48 ( )
void make_random_vector ( EST_DVector M,
const double  scale 
)

all elements are randomised

Definition at line 622 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_diagonal_matrix ( EST_DMatrix M,
const double  scale 
)

used for variance

Definition at line 654 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_poly_basis_function ( EST_DMatrix T,
EST_DVector  t 
)

Definition at line 670 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.

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 inplace_diagonalise ( EST_DMatrix a)

inplace diagonalise

Definition at line 179 of file vec_mat_aux_d.cc.

double determinant ( const EST_DMatrix a)

Definition at line 440 of file vec_mat_aux_d.cc.

int singular ( EST_DMatrix a)

not implemented ??

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 triangulate ( const EST_DMatrix a)

Definition at line 235 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.

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 sum ( const EST_DMatrix a)

sum of elements

Definition at line 150 of file vec_mat_aux_d.cc.

void multiply ( const EST_DMatrix a,
const EST_DMatrix b,
EST_DMatrix c 
)

Definition at line 293 of file EST_DMatrix.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.

EST_DMatrix operator* ( const EST_DMatrix a,
const EST_DMatrix b 
)

Definition at line 286 of file EST_DMatrix.cc.

EST_DMatrix operator- ( const EST_DMatrix a,
const EST_DMatrix b 
)

Definition at line 154 of file EST_DMatrix.cc.

EST_DMatrix operator+ ( const EST_DMatrix a,
const EST_DMatrix b 
)

Definition at line 132 of file EST_DMatrix.cc.

EST_DVector operator- ( const EST_DVector a,
const EST_DVector b 
)

Definition at line 236 of file EST_DMatrix.cc.

EST_DVector operator+ ( const EST_DVector a,
const EST_DVector b 
)

Definition at line 219 of file EST_DMatrix.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 DMatrix_abs ( const EST_DMatrix a)

Definition at line 273 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.

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 polynomial_value ( const EST_DVector coeffs,
const double  x 
)

Definition at line 564 of file vec_mat_aux_d.cc.

double operator* ( const EST_DVector v1,
const EST_DVector v2 
)

vector dot product

Definition at line 727 of file EST_DMatrix.cc.