linalg__private Namespace Reference

Linear algebra utilities. More...

Functions

VectorAddExpert (double alpha, const Vector *const u, Vector *const v)
 Sets vector v to v + alpha * u ($ \vec{v} \gets \vec{v} + \alpha \vec{u} $).
Matrix * AddExpert (double alpha, const Matrix *const A, Matrix *const B)
 Sets matrix B to B + alpha * A ($ B \gets B + \alpha A $).
VectorAddTo (const Vector *const u, Vector *const v)
 Sets vector v to v + u ($ \vec{v} \gets \vec{v} + \vec{u} $).
Matrix * AddTo (const Matrix *const A, Matrix *const B)
 Sets matrix B to B + A ($ B \gets B + A $).
double ArgMinus (double x, double arg)
 Returns $ arg - x $.
void Center (Matrix X, Matrix *X_centered)
 Sets a matrix to a centered matrix, where centering is done by subtracting the sum over the columns (a column vector) from each column of the matrix.
Matrix * ColVector (index_t n, double value, Matrix *col_vector)
 Inits a n-dimensional column vector and sets all entries to value.
Matrix * DiagMatrixInit (index_t n, double value, Matrix *diag_matrix)
 Inits a n by n diagonal matrix and sets the diagonal entries to value.
VectorDiagToVector (const Matrix *const diag_matrix, Vector *diag_vector)
 Inits the components of a vector to the diagonal entries of a square matrix.
VectorDotMultiplyInit (const Vector *const u, const Vector *const v, Vector *w)
 Multiplies u and v entry-wise and Inits a vector to the result.
Matrix * DotMultiplyInit (const Matrix *const A, const Matrix *const B, Matrix *C)
 Multiplies A and B entry-wise and Inits a matrix to the result.
VectorDotMultiplyOverwrite (const Vector *const u, Vector *const v)
 Multiplies u and v entry-wise and overwrites vector v with the result.
Matrix * DotMultiplyOverwrite (const Matrix *const A, Matrix *const B)
 Multiplies A and B entry-wise and overwrites matrix B with the result.
Matrix * DotMultiplySum (const Matrix *const A, const Matrix *const B, Matrix *sum_vector)
 Multiplies A and B (N by M matrices) entry-wise and Inits a 1 by N matrix to the sum over the transformed rows of the result ($ C = A \bullet B $, sum_vector $ \gets \sum_i \vec{C_{row i}} $).
double ExpArg (double x, double arg)
 Returns $ x^{arg} $.
double Inv (double x, double arg)
 Returns $ 1 / x $.
void MakeSubMatrixByColumns (Vector column_indices, Matrix A, Matrix *A_sub)
 Inits a matrix to the columns of A specified in column_indices.
VectorMapInit (double(*function)(double, double), double arg, const Vector *const u, Vector *v)
 Inits a vector to the result of applying function with argument arg to a vector ($ v_i \gets function(u_i, arg) $).
Matrix * MapInit (double(*function)(double, double), double arg, const Matrix *const A, Matrix *B)
 Inits a matrix to the result of applying function with argument arg to a matrix ($ B_{i,j} \gets function(A_{i,j}, arg) $).
VectorMapOverwrite (double(*function)(double, double), double arg, Vector *const v)
 Applies function with argument arg to vector v and overwrites v with the result ($ v_i \gets function(v_i, arg) $).
Matrix * MapOverwrite (double(*function)(double, double), double arg, Matrix *A)
 Applies function with argument arg to matrix A and overwrites A with the result ($ A_{i,j} \gets function(A_{i,j}, arg) $).
Matrix * MatrixMapSum (double(*function)(double, double), double arg, const Matrix *const A, Matrix *sum_vector)
 Applies function with argument arg to a M by N Matrix and Inits a 1 by N matrix to the sum over the transformed rows ($ \tilde{A}_{i,j} \gets function(A_{i,j}, arg) $, sum_vector $ \gets \sum_i \vec{\tilde{A}_{row i}} $).
double MinusArg (double x, double arg)
 Returns $ x - arg $.
VectorMulInit (const Vector *const u, const Matrix *const A, Vector *const v)
 Inits a vector to u A or A' u ($ \vec{u} \gets \vec{u} A $ or $ \vec{u} \gets A^T \vec{u} $).
VectorMulInit (const Matrix *const A, const Vector *const u, Vector *const v)
 Inits a vector to A * u ($ \vec{v} \gets A \vec{u} $).
Matrix * MulInit (const Matrix *const A, const Matrix *const B, Matrix *const C)
 Inits a matrix to A * B ($ C \gets A B $).
Matrix * MulOverwrite (const Matrix *const A, const Matrix *const B, Matrix *const C)
 Overwrites a matrix with A * B ($ C \gets A B $).
Matrix * MulTransAInit (const Matrix *const A, const Matrix *const B, Matrix *C)
 Inits a matrix to A' * B ($ C \gets A^T B $).
Matrix * MulTransAOverwrite (const Matrix *const A, const Matrix *const B, Matrix *const C)
 Overwrites a matrix with A' * B ($ C \gets A^T B $).
Matrix * MulTransBInit (const Matrix *const A, const Matrix *const B, Matrix *C)
 Inits a matrix to A * B' ($ C \gets A B^T $).
Matrix * MulTransBOverwrite (const Matrix *const A, Matrix *const B, Matrix *const C)
 Overwrites a matrix with A * B' ($ C \gets A B^T $).
void Orthogonalize (const Matrix W_old, Matrix *W)
 Orthogonalize W and return the result in W, using Eigen Decomposition.
double Plus (double x, double arg)
 Returns $ x + arg $.
void RandMatrix (index_t n_rows, index_t n_cols, Matrix *A)
 Inits a matrix to uniform random entries in [0,1].
Matrix * RandNormalInit (index_t d, index_t n, Matrix *A)
 Inits a matrix to random normally distributed entries from N(0,1).
void RandVector (Vector &v)
 Overwrites a dimension-N vector to a random vector on the unit sphere in R^N.
Matrix * RepeatMatrix (index_t num_row_reps, index_t num_col_reps, Matrix base_matrix, Matrix *new_matrix)
 Inits a matrix to a num_row_reps by num_col_reps block matrix where each block is base_matrix.
void SaveCorrectly (const char *filename, Matrix a)
 Save the matrix to a file so that rows in the matrix correspond to rows in the file: This just means call data::Save() on the transpose of the matrix.
VectorScale (double alpha, Vector *v)
 Sets v to alpha * v ($ \vec{v} \gets \alpha \vec{v} $).
Matrix * Scale (double alpha, Matrix *A)
 Sets A to alpha * A ($ A \gets \alpha * A $).
VectorScaleInit (double alpha, const Vector *const u, Vector *v)
 Inits a vector to alpha * u ($ \vec{v} \gets \alpha \vec{u} $).
Matrix * ScaleInit (double alpha, const Matrix *const A, Matrix *B)
 Inits a matrix to alpha * A ($ B \gets \alpha A $).
double Square (double x, double arg)
 Returns $ x^2 $.
double SquareArg (double x, double arg)
 Returns $ arg (x^2) $.
VectorSubFrom (const Vector *const u, Vector *const v)
 Sets vector v to v - u ($ \vec{v} \gets \vec{v} - \vec{u} $).
Matrix * SubFrom (const Matrix *const A, Matrix *const B)
 Sets matrix B to B - A ($ B \gets B - A $).
VectorSubInit (const Vector *const u, const Vector *const v, Vector *w)
 Inits a vector to u - v ($ \vec{w} \gets \vec{u} - \vec{v} $).
Matrix * SubInit (const Matrix *const A, const Matrix *const B, Matrix *C)
 Inits a matrix to A - B ($ C \gets A - B $).
Matrix * SubOverwrite (const Matrix *const A, const Matrix *const B, Matrix *const C)
 Overwrites a matrix with A - B ($ C \gets A - B $).
double Sum (Vector *v)
 Returns the sum of the components of vector v (returns $ \sum v_i $).
Matrix * Sum (const Matrix *const A, Matrix *sum_vector)
 Sums over the rows of a M by N matrix and Inits a 1 by N matrix storing the sum (sum_vector $ \gets \sum_i \vec{A_{row i}} $).
double TanhArg (double x, double arg)
 Returns $ \tanh(arg x) $.
double Times (double x, double arg)
 Returns $ arg x $.
double VectorMapSum (double(*function)(double, double), double arg, const Vector *const v)
 Applies function with argument arg to vector v and returns the sum of the transformed components (sum $ \gets \sum_i function(v_i, arg) $).
Matrix * VectorToDiag (const Vector *const diag_vector, Matrix *diag_matrix)
 Inits the diagonal entries of a N by N diagonal matrix to the entries of a N-dimensional vector.
Matrix * VectorToDiag (const Matrix *const diag_vector, Matrix *diag_matrix)
 Inits the diagonal entries of a N by N diagonal matrix to the entries of a 1 by N matrix.
void WhitenUsingEig (Matrix X, Matrix *X_whitened, Matrix *whitening_matrix)
 Whitens a matrix using the eigen decomposition of the covariance matrix.
void WhitenUsingSVD (Matrix X, Matrix *X_whitened, Matrix *whitening_matrix)
 Whitens a matrix using the singular value decomposition of the covariance matrix.

Detailed Description

Linear algebra utilities.

This includes, among other things, Map, Sum, Addition, Subtraction, Multiplication, Hadamard product (entry-wise multiplication), Whitening, Random vectors on the unit sphere, Random uniform matrices, Random normal matrices, creating a Submatrix that is a slice of selected columns of a matrix, Block matrix construction from a base matrix Note that the __private is temporary until this code is merged into a larger namespace of linear algebra utilities


Function Documentation

Vector* linalg__private::AddExpert ( double  alpha,
const Vector *const   u,
Vector *const   v 
)

Sets vector v to v + alpha * u ($ \vec{v} \gets \vec{v} + \alpha \vec{u} $).

Definition at line 591 of file lin_alg.h.

References AddExpert().

Matrix* linalg__private::AddExpert ( double  alpha,
const Matrix *const   A,
Matrix *const   B 
)

Sets matrix B to B + alpha * A ($ B \gets B + \alpha A $).

Definition at line 581 of file lin_alg.h.

Referenced by AddExpert(), FastICA::DeflationFixedPointICA(), MoGEM::ExpectationMaximization(), and MoGL2E::L2Error().

Vector* linalg__private::AddTo ( const Vector *const   u,
Vector *const   v 
)

Sets vector v to v + u ($ \vec{v} \gets \vec{v} + \vec{u} $).

Definition at line 572 of file lin_alg.h.

References AddTo().

Matrix* linalg__private::AddTo ( const Matrix *const   A,
Matrix *const   B 
)
double linalg__private::ArgMinus ( double  x,
double  arg 
)

Returns $ arg - x $.

Definition at line 131 of file lin_alg.h.

void linalg__private::Center ( Matrix  X,
Matrix *  X_centered 
)

Sets a matrix to a centered matrix, where centering is done by subtracting the sum over the columns (a column vector) from each column of the matrix.

Definition at line 717 of file lin_alg.h.

References AddTo(), GenVector< T >::Init(), Scale(), GenVector< T >::SetZero(), and SubFrom().

Referenced by FastICA::DoFastICA().

Matrix* linalg__private::ColVector ( index_t  n,
double  value,
Matrix *  col_vector 
)

Inits a n-dimensional column vector and sets all entries to value.

Definition at line 151 of file lin_alg.h.

Matrix* linalg__private::DiagMatrixInit ( index_t  n,
double  value,
Matrix *  diag_matrix 
)

Inits a n by n diagonal matrix and sets the diagonal entries to value.

Definition at line 138 of file lin_alg.h.

Vector* linalg__private::DiagToVector ( const Matrix *const   diag_matrix,
Vector diag_vector 
)

Inits the components of a vector to the diagonal entries of a square matrix.

Precondition:
{ diag_matrix is square }

Definition at line 384 of file lin_alg.h.

Vector* linalg__private::DotMultiplyInit ( const Vector *const   u,
const Vector *const   v,
Vector w 
)

Multiplies u and v entry-wise and Inits a vector to the result.

Precondition:
{ u and v are of equal dimensions } ($ \vec{w} \gets \vec{u} \bullet \vec{v} $)

Definition at line 297 of file lin_alg.h.

Matrix* linalg__private::DotMultiplyInit ( const Matrix *const   A,
const Matrix *const   B,
Matrix *  C 
)

Multiplies A and B entry-wise and Inits a matrix to the result.

Precondition:
{ A and B are of equal dimensions } ($ C \gets A .* B $)

Definition at line 248 of file lin_alg.h.

Vector* linalg__private::DotMultiplyOverwrite ( const Vector *const   u,
Vector *const   v 
)

Multiplies u and v entry-wise and overwrites vector v with the result.

Precondition:
{ u and v are of equal dimensions } ($ \vec{v} \gets \vec{u} \bullet \vec{v} $)

Definition at line 315 of file lin_alg.h.

Matrix* linalg__private::DotMultiplyOverwrite ( const Matrix *const   A,
Matrix *const   B 
)

Multiplies A and B entry-wise and overwrites matrix B with the result.

Precondition:
{ A and B are of equal dimensions } ($ B \gets A \bullet B $)

Definition at line 275 of file lin_alg.h.

Matrix* linalg__private::DotMultiplySum ( const Matrix *const   A,
const Matrix *const   B,
Matrix *  sum_vector 
)

Multiplies A and B (N by M matrices) entry-wise and Inits a 1 by N matrix to the sum over the transformed rows of the result ($ C = A \bullet B $, sum_vector $ \gets \sum_i \vec{C_{row i}} $).

Definition at line 330 of file lin_alg.h.

double linalg__private::ExpArg ( double  x,
double  arg 
)

Returns $ x^{arg} $.

Definition at line 75 of file lin_alg.h.

double linalg__private::Inv ( double  x,
double  arg 
)

Returns $ 1 / x $.

Definition at line 82 of file lin_alg.h.

void linalg__private::MakeSubMatrixByColumns ( Vector  column_indices,
Matrix  A,
Matrix *  A_sub 
)

Inits a matrix to the columns of A specified in column_indices.

Definition at line 698 of file lin_alg.h.

References GenVector< T >::CopyValues(), and GenVector< T >::length().

Referenced by FastICA::RandomSubMatrix().

Vector* linalg__private::MapInit ( double(*)(double, double)  function,
double  arg,
const Vector *const   u,
Vector v 
)

Inits a vector to the result of applying function with argument arg to a vector ($ v_i \gets function(u_i, arg) $).

Definition at line 668 of file lin_alg.h.

Matrix* linalg__private::MapInit ( double(*)(double, double)  function,
double  arg,
const Matrix *const   A,
Matrix *  B 
)

Inits a matrix to the result of applying function with argument arg to a matrix ($ B_{i,j} \gets function(A_{i,j}, arg) $).

Definition at line 641 of file lin_alg.h.

Vector* linalg__private::MapOverwrite ( double(*)(double, double)  function,
double  arg,
Vector *const   v 
)

Applies function with argument arg to vector v and overwrites v with the result ($ v_i \gets function(v_i, arg) $).

Definition at line 624 of file lin_alg.h.

Matrix* linalg__private::MapOverwrite ( double(*)(double, double)  function,
double  arg,
Matrix *  A 
)

Applies function with argument arg to matrix A and overwrites A with the result ($ A_{i,j} \gets function(A_{i,j}, arg) $).

Definition at line 602 of file lin_alg.h.

Matrix* linalg__private::MatrixMapSum ( double(*)(double, double)  function,
double  arg,
const Matrix *const   A,
Matrix *  sum_vector 
)

Applies function with argument arg to a M by N Matrix and Inits a 1 by N matrix to the sum over the transformed rows ($ \tilde{A}_{i,j} \gets function(A_{i,j}, arg) $, sum_vector $ \gets \sum_i \vec{\tilde{A}_{row i}} $).

Definition at line 203 of file lin_alg.h.

double linalg__private::MinusArg ( double  x,
double  arg 
)

Returns $ x - arg $.

Definition at line 124 of file lin_alg.h.

Vector* linalg__private::MulInit ( const Vector *const   u,
const Matrix *const   A,
Vector *const   v 
)

Inits a vector to u A or A' u ($ \vec{u} \gets \vec{u} A $ or $ \vec{u} \gets A^T \vec{u} $).

Definition at line 457 of file lin_alg.h.

References MulInit().

Vector* linalg__private::MulInit ( const Matrix *const   A,
const Vector *const   u,
Vector *const   v 
)

Inits a vector to A * u ($ \vec{v} \gets A \vec{u} $).

Definition at line 447 of file lin_alg.h.

References MulInit().

Matrix* linalg__private::MulInit ( const Matrix *const   A,
const Matrix *const   B,
Matrix *const   C 
)
Matrix* linalg__private::MulOverwrite ( const Matrix *const   A,
const Matrix *const   B,
Matrix *const   C 
)
Matrix* linalg__private::MulTransAInit ( const Matrix *const   A,
const Matrix *const   B,
Matrix *  C 
)

Inits a matrix to A' * B ($ C \gets A^T B $).

Definition at line 477 of file lin_alg.h.

Referenced by la::LeastSquareFit(), Orthogonalize(), FastICA::SymmetricFixedPointICA(), and WhitenUsingSVD().

Matrix* linalg__private::MulTransAOverwrite ( const Matrix *const   A,
const Matrix *const   B,
Matrix *const   C 
)

Overwrites a matrix with A' * B ($ C \gets A^T B $).

Definition at line 487 of file lin_alg.h.

Referenced by FastICA::SymmetricFixedPointICA().

Matrix* linalg__private::MulTransBInit ( const Matrix *const   A,
const Matrix *const   B,
Matrix *  C 
)

Inits a matrix to A * B' ($ C \gets A B^T $).

Definition at line 497 of file lin_alg.h.

Referenced by DoSvmNormalize(), la::LeastSquareFitTrans(), Orthogonalize(), WhitenUsingEig(), and WhitenUsingSVD().

Matrix* linalg__private::MulTransBOverwrite ( const Matrix *const   A,
Matrix *const   B,
Matrix *const   C 
)

Overwrites a matrix with A * B' ($ C \gets A B^T $).

Definition at line 507 of file lin_alg.h.

Referenced by KalmanFiltTimeInvariantMstUpdate(), and KalmanFiltTimeInvariantTimeUpdate().

void linalg__private::Orthogonalize ( const Matrix  W_old,
Matrix *  W 
)

Orthogonalize W and return the result in W, using Eigen Decomposition.

Precondition:
W and W_old store the same matrix in disjoint memory

Definition at line 890 of file lin_alg.h.

References MulInit(), MulOverwrite(), MulTransAInit(), and MulTransBInit().

Referenced by FastICA::SymmetricFixedPointICA().

double linalg__private::Plus ( double  x,
double  arg 
)

Returns $ x + arg $.

Definition at line 117 of file lin_alg.h.

void linalg__private::RandMatrix ( index_t  n_rows,
index_t  n_cols,
Matrix *  A 
)

Inits a matrix to uniform random entries in [0,1].

Definition at line 685 of file lin_alg.h.

Matrix* linalg__private::RandNormalInit ( index_t  d,
index_t  n,
Matrix *  A 
)

Inits a matrix to random normally distributed entries from N(0,1).

Definition at line 835 of file lin_alg.h.

void linalg__private::RandVector ( Vector v  ) 

Overwrites a dimension-N vector to a random vector on the unit sphere in R^N.

Returns vector realization of zero-mean multi-variate Gaussian with unit covariance; vector needs to be a-priori initialized and passed by ref.

Definition at line 811 of file lin_alg.h.

Referenced by FastICA::DeflationFixedPointICA(), and FastICA::SymmetricFixedPointICA().

Matrix* linalg__private::RepeatMatrix ( index_t  num_row_reps,
index_t  num_col_reps,
Matrix  base_matrix,
Matrix *  new_matrix 
)

Inits a matrix to a num_row_reps by num_col_reps block matrix where each block is base_matrix.

Definition at line 861 of file lin_alg.h.

void linalg__private::SaveCorrectly ( const char *  filename,
Matrix  a 
)

Save the matrix to a file so that rows in the matrix correspond to rows in the file: This just means call data::Save() on the transpose of the matrix.

Definition at line 66 of file lin_alg.h.

References data::Save(), and la::TransposeInit().

Vector* linalg__private::Scale ( double  alpha,
Vector v 
)

Sets v to alpha * v ($ \vec{v} \gets \alpha \vec{v} $).

Definition at line 410 of file lin_alg.h.

References Scale().

Matrix* linalg__private::Scale ( double  alpha,
Matrix *  A 
)
Vector* linalg__private::ScaleInit ( double  alpha,
const Vector *const   u,
Vector v 
)

Inits a vector to alpha * u ($ \vec{v} \gets \alpha \vec{u} $).

Definition at line 428 of file lin_alg.h.

References ScaleInit().

Matrix* linalg__private::ScaleInit ( double  alpha,
const Matrix *const   A,
Matrix *  B 
)

Inits a matrix to alpha * A ($ B \gets \alpha A $).

Definition at line 419 of file lin_alg.h.

Referenced by MoGL2E::RegularizationTerm_(), and ScaleInit().

double linalg__private::Square ( double  x,
double  arg 
)

Returns $ x^2 $.

Definition at line 89 of file lin_alg.h.

double linalg__private::SquareArg ( double  x,
double  arg 
)

Returns $ arg (x^2) $.

Definition at line 96 of file lin_alg.h.

Vector* linalg__private::SubFrom ( const Vector *const   u,
Vector *const   v 
)

Sets vector v to v - u ($ \vec{v} \gets \vec{v} - \vec{u} $).

Definition at line 554 of file lin_alg.h.

References SubFrom().

Matrix* linalg__private::SubFrom ( const Matrix *const   A,
Matrix *const   B 
)

Sets matrix B to B - A ($ B \gets B - A $).

Definition at line 545 of file lin_alg.h.

Referenced by Center(), MoGEM::ExpectationMaximization(), and SubFrom().

Vector* linalg__private::SubInit ( const Vector *const   u,
const Vector *const   v,
Vector w 
)

Inits a vector to u - v ($ \vec{w} \gets \vec{u} - \vec{v} $).

Definition at line 526 of file lin_alg.h.

References SubInit().

Matrix* linalg__private::SubInit ( const Matrix *const   A,
const Matrix *const   B,
Matrix *  C 
)

Inits a matrix to A - B ($ C \gets A - B $).

Definition at line 517 of file lin_alg.h.

Referenced by FastICA::DeflationFixedPointICA(), GaussianHMM::InitGaussParameter(), and SubInit().

Matrix* linalg__private::SubOverwrite ( const Matrix *const   A,
const Matrix *const   B,
Matrix *const   C 
)

Overwrites a matrix with A - B ($ C \gets A - B $).

Definition at line 535 of file lin_alg.h.

Referenced by MoGEM::KMeans(), and MoGL2E::KMeans_().

double linalg__private::Sum ( Vector v  ) 

Returns the sum of the components of vector v (returns $ \sum v_i $).

Definition at line 186 of file lin_alg.h.

Matrix* linalg__private::Sum ( const Matrix *const   A,
Matrix *  sum_vector 
)

Sums over the rows of a M by N matrix and Inits a 1 by N matrix storing the sum (sum_vector $ \gets \sum_i \vec{A_{row i}} $).

Definition at line 163 of file lin_alg.h.

double linalg__private::TanhArg ( double  x,
double  arg 
)

Returns $ \tanh(arg x) $.

Definition at line 103 of file lin_alg.h.

double linalg__private::Times ( double  x,
double  arg 
)

Returns $ arg x $.

Definition at line 110 of file lin_alg.h.

double linalg__private::VectorMapSum ( double(*)(double, double)  function,
double  arg,
const Vector *const   v 
)

Applies function with argument arg to vector v and returns the sum of the transformed components (sum $ \gets \sum_i function(v_i, arg) $).

Definition at line 230 of file lin_alg.h.

Matrix* linalg__private::VectorToDiag ( const Vector *const   diag_vector,
Matrix *  diag_matrix 
)

Inits the diagonal entries of a N by N diagonal matrix to the entries of a N-dimensional vector.

Definition at line 373 of file lin_alg.h.

Matrix* linalg__private::VectorToDiag ( const Matrix *const   diag_vector,
Matrix *  diag_matrix 
)

Inits the diagonal entries of a N by N diagonal matrix to the entries of a 1 by N matrix.

Definition at line 356 of file lin_alg.h.

void linalg__private::WhitenUsingEig ( Matrix  X,
Matrix *  X_whitened,
Matrix *  whitening_matrix 
)

Whitens a matrix using the eigen decomposition of the covariance matrix.

Whitening means the covariance matrix of the result is the identity matrix

Definition at line 778 of file lin_alg.h.

References GenVector< T >::length(), MulInit(), MulTransBInit(), and Scale().

Referenced by FastICA::DoFastICA().

void linalg__private::WhitenUsingSVD ( Matrix  X,
Matrix *  X_whitened,
Matrix *  whitening_matrix 
)

Whitens a matrix using the singular value decomposition of the covariance matrix.

Whitening means the covariance matrix of the result is the identity matrix

Definition at line 747 of file lin_alg.h.

References GenVector< T >::length(), MulInit(), MulTransAInit(), MulTransBInit(), and Scale().

Generated on Mon Jan 24 12:04:41 2011 for FASTlib by  doxygen 1.6.3