Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

Matrix Decompositions


Functions

bool SPUC::chol (const mat &X, mat &F)
 Cholesky factorisation of real symmetric and positive definite matrix.
mat SPUC::chol (const mat &X)
 Cholesky factorisation of real symmetric and positive definite matrix.
bool SPUC::chol (const mat &X, int p, mat &F)
 Cholesky factorisation of an n by n band-matrix X. Bandwidth p.
mat SPUC::chol (const mat &X, int p)
 Cholesky factorisation of a band matrix.
bool SPUC::lu (const mat &X, mat &L, mat &U, ivec &p)
 LU factorisation of real matrix.
void SPUC::interchange_permutations (vec &b, const ivec &p)
 Makes swapping of vector b according to the inerchange permutation vector p.
bmat SPUC::permutation_matrix (const ivec &p)
 Make permutation matrix P from the interchange permutation vector p.
bool SPUC::svd (const mat &A, vec &S)
 Singular Value Decomposition (SVD).
bool SPUC::svd (const cmat &A, vec &S)
 Singular Value Decomposition (SVD).
vec SPUC::svd (const mat &A)
 Singular Value Decomposition (SVD).
vec SPUC::svd (const cmat &A)
 Singular Value Decomposition (SVD).
bool SPUC::svd (const mat &A, mat &U, vec &S, mat &V)
 Singular Value Decomposition (SVD).
bool SPUC::svd (const cmat &A, cmat &U, vec &S, cmat &V)
 Singular Value Decomposition (SVD).

Function Documentation

mat SPUC::chol const mat &  X,
int  p
 

Cholesky factorisation of a band matrix.

Cholesky factorisation of an n by n band-matrix X. Bandwidth p. If X is positive definite, F=chol(X) produces an upper triangular F. If also X is symmetric then F'*F = X. If X is not positive definite, an error message is printed.

Uses n*(p^2+3*p) flops and n sqrt() (if n >> p). Uses Alg. 4.3.5 (outer product version) in Golub & van Loan "Matrix computations", 3rd ed., p. 156.

bool SPUC::chol const mat &  X,
int  p,
mat &  F
 

Cholesky factorisation of an n by n band-matrix X. Bandwidth p.

If X is positive definite, true is returned and F=chol(X) produces an upper triangular F. If also X is symmetric then F'*F = X. If X is not positive definite, false is returned.

Uses n*(p^2+3*p) flops and n sqrt() (if n >> p). Uses Alg. 4.3.5 (outer product version) in Golub & van Loan "Matrix computations", 3rd ed., p. 156.

mat SPUC::chol const mat &  X  ) 
 

Cholesky factorisation of real symmetric and positive definite matrix.

The Cholesky factorisation of a real symmetric positive-definite matrix $\mathbf{X}$ of size $n \times n$ is given by

\[ \mathbf{X} = \mathbf{F}^T \mathbf{F} \]

where $\mathbf{F}$ is an upper trangular $n \times n$ matrix.

bool SPUC::chol const mat &  X,
mat &  F
 

Cholesky factorisation of real symmetric and positive definite matrix.

The Cholesky factorisation of a real symmetric positive-definite matrix $\mathbf{X}$ of size $n \times n$ is given by

\[ \mathbf{X} = \mathbf{F}^T \mathbf{F} \]

where $\mathbf{F}$ is an upper trangular $n \times n$ matrix.

Returns true if calcuation succeeded. False otherwise.

void SPUC::interchange_permutations vec &  b,
const ivec &  p
 

Makes swapping of vector b according to the inerchange permutation vector p.

bool SPUC::lu const mat &  X,
mat &  L,
mat &  U,
ivec &  p
 

LU factorisation of real matrix.

The LU factorization of the real matrix $\mathbf{X}$ of size $n \times n$ is given by

\[ \mathbf{X} = \mathbf{P}^T \mathbf{L} \mathbf{U} , \]

where $\mathbf{L}$ and $\mathbf{U}$ are lower and upper triangular matrices and $\mathbf{P}$ is a permutation matrix.

The interchange permutation vector p is such that k and p(k) should be changed for all k. Given this vector a permuation matrix can be constructed using the function

    bmat permuation_matrix(const ivec &p)

If X is an n by n matrix lu(X,L,U,p) computes the LU decomposition. L is a lower trangular, U an upper triangular matrix. p is the interchange permutation vector such that k and p(k) should be changed for all k.

Returns true is calculation succeeds. False otherwise.

bmat SPUC::permutation_matrix const ivec &  p  ) 
 

Make permutation matrix P from the interchange permutation vector p.

bool SPUC::svd const cmat &  A,
cmat &  U,
vec &  S,
cmat &  V
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]

bool SPUC::svd const mat &  A,
mat &  U,
vec &  S,
mat &  V
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]

vec SPUC::svd const cmat &  A  ) 
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]

vec SPUC::svd const mat &  A  ) 
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]

bool SPUC::svd const cmat &  A,
vec &  S
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]

bool SPUC::svd const mat &  A,
vec &  S
 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathbf{U}^T \mathbf{A} \mathbf{V} = \mathrm{diag}(\mathbf{s}) = \mathrm{diag}(\sigma_1, \ldots, \sigma_p) \]

where the elements of $\mathbf{s}$ , $\sigma_1 \geq \sigma_2 \geq \ldots \sigma_p \geq 0$ are the singular values of $\mathbf{A}$ . Or put differently

\[ \mathbf{A} = \mathbf{U} \mathbf{S} \mathbf{V}^H \]


Generated on Fri Sep 16 11:06:48 2005 for spuc by  doxygen 1.4.4