IT++ Logo Newcom Logo

Matrix Decompositions


Functions

bool itpp::chol (const mat &X, mat &F)
 Cholesky factorisation of real symmetric and positive definite matrix.
mat itpp::chol (const mat &X)
 Cholesky factorisation of real symmetric and positive definite matrix.
bool itpp::chol (const cmat &X, cmat &F)
 Cholesky factorisation of complex hermitian and positive-definite matrix.
cmat itpp::chol (const cmat &X)
 Cholesky factorisation of complex hermitian and positive-definite matrix.
bool itpp::eig_sym (const mat &A, vec &d, mat &V)
 Calculates the eigenvalues and eigenvectors of a symmetric real matrix.
bool itpp::eig_sym (const mat &A, vec &d)
 Calculates the eigenvalues of a symmetric real matrix.
vec itpp::eig_sym (const mat &A)
 Calculates the eigenvalues of a symmetric real matrix.
bool itpp::eig_sym (const cmat &A, vec &d, cmat &V)
 Calculates the eigenvalues and eigenvectors of a hermitian complex matrix.
bool itpp::eig_sym (const cmat &A, vec &d)
 Calculates the eigenvalues of a hermitian complex matrix.
vec itpp::eig_sym (const cmat &A)
 Calculates the eigenvalues of a hermitian complex matrix.
bool itpp::eig (const mat &A, cvec &d, cmat &V)
 Caclulates the eigenvalues and eigenvectors of a real non-symmetric matrix.
bool itpp::eig (const mat &A, cvec &d)
 Caclulates the eigenvalues of a real non-symmetric matrix.
cvec itpp::eig (const mat &A)
 Caclulates the eigenvalues of a real non-symmetric matrix.
bool itpp::eig (const cmat &A, cvec &d, cmat &V)
 Calculates the eigenvalues and eigenvectors of a complex non-hermitian matrix.
bool itpp::eig (const cmat &A, cvec &d)
 Calculates the eigenvalues of a complex non-hermitian matrix.
cvec itpp::eig (const cmat &A)
 Calculates the eigenvalues of a complex non-hermitian matrix.
bool itpp::lu (const mat &X, mat &L, mat &U, ivec &p)
 LU factorisation of real matrix.
bool itpp::lu (const cmat &X, cmat &L, cmat &U, ivec &p)
 LU factorisation of real matrix.
void itpp::interchange_permutations (vec &b, const ivec &p)
 Makes swapping of vector b according to the inerchange permutation vector p.
bmat itpp::permutation_matrix (const ivec &p)
 Make permutation matrix P from the interchange permutation vector p.
bool itpp::qr (const mat &A, mat &Q, mat &R)
 QR factorisation of real matrix.
bool itpp::qr (const mat &A, mat &Q, mat &R, bmat &P)
 QR factorisation of real matrix with pivoting.
bool itpp::qr (const cmat &A, cmat &Q, cmat &R)
 QR factorisation of a complex matrix.
bool itpp::qr (const cmat &A, cmat &Q, cmat &R, bmat &P)
 QR factorisation of a complex matrix with pivoting.
bool itpp::schur (const mat &A, mat &U, mat &T)
 Schur decomposition of a real matrix.
mat itpp::schur (const mat &A)
 Schur decomposition of a real matrix.
bool itpp::schur (const cmat &A, cmat &U, cmat &T)
 Schur decomposition of a complex matrix.
cmat itpp::schur (const cmat &A)
 Schur decomposition of a complex matrix.
bool itpp::svd (const mat &A, vec &S)
 Singular Value Decomposition (SVD).
bool itpp::svd (const cmat &A, vec &S)
 Singular Value Decomposition (SVD).
vec itpp::svd (const mat &A)
 Singular Value Decomposition (SVD).
vec itpp::svd (const cmat &A)
 Singular Value Decomposition (SVD).
bool itpp::svd (const mat &A, mat &U, vec &S, mat &V)
 Singular Value Decomposition (SVD).
bool itpp::svd (const cmat &A, cmat &U, vec &S, cmat &V)
 Singular Value Decomposition (SVD).

Function Documentation

bool itpp::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.

Definition at line 50 of file cholesky.cpp.

Referenced by itpp::chol().

mat itpp::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.

Definition at line 114 of file cholesky.cpp.

References itpp::chol(), and it_warning.

bool itpp::chol ( const cmat X,
cmat F 
)

Cholesky factorisation of complex hermitian and positive-definite matrix.

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

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

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

Returns true if calcuation succeeded. False otherwise.

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.

Definition at line 69 of file cholesky.cpp.

cmat itpp::chol ( const cmat X  ) 

Cholesky factorisation of complex hermitian and positive-definite matrix.

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

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

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

Definition at line 104 of file cholesky.cpp.

References itpp::chol(), and it_warning.

bool itpp::eig_sym ( const mat A,
vec d,
mat V 
)

Calculates the eigenvalues and eigenvectors of a symmetric real matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real and symmetric $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

The eigenvectors are the columns of the matrix V. True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine DSYEV.

Definition at line 51 of file eigen.cpp.

References it_assert1, and max.

Referenced by itpp::eig_sym().

bool itpp::eig_sym ( const mat A,
vec d 
)

Calculates the eigenvalues of a symmetric real matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real and symmetric $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine DSYEV.

Definition at line 72 of file eigen.cpp.

References it_assert1, and max.

vec itpp::eig_sym ( const mat A  ) 

Calculates the eigenvalues of a symmetric real matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real and symmetric $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

Uses the LAPACK routine DSYEV.

Definition at line 301 of file eigen.cpp.

References itpp::eig_sym().

bool itpp::eig_sym ( const cmat A,
vec d,
cmat V 
)

Calculates the eigenvalues and eigenvectors of a hermitian complex matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex and hermitian $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

The eigenvectors are the columns of the matrix V. True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine ZHEEV.

Definition at line 93 of file eigen.cpp.

References it_assert1, and max.

bool itpp::eig_sym ( const cmat A,
vec d 
)

Calculates the eigenvalues of a hermitian complex matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex and hermitian $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine ZHEEV.

Definition at line 115 of file eigen.cpp.

References it_assert1, and max.

vec itpp::eig_sym ( const cmat A  ) 

Calculates the eigenvalues of a hermitian complex matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex and hermitian $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

Uses the LAPACK routine ZHEEV.

Definition at line 308 of file eigen.cpp.

References itpp::eig_sym().

Referenced by mpower(), and pcamat().

bool itpp::eig ( const mat A,
cvec d,
cmat V 
)

Caclulates the eigenvalues and eigenvectors of a real non-symmetric matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

The eigenvectors are the columns of the matrix V. True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine DGEEV.

Definition at line 139 of file eigen.cpp.

References itpp::conj(), it_assert1, max, and itpp::to_cvec().

Referenced by itpp::eig(), and itpp::roots().

bool itpp::eig ( const mat A,
cvec d 
)

Caclulates the eigenvalues of a real non-symmetric matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine DGEEV.

Definition at line 177 of file eigen.cpp.

References it_assert1, max, and itpp::to_cvec().

cvec itpp::eig ( const mat A  ) 

Caclulates the eigenvalues of a real non-symmetric matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the real $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

Uses the LAPACK routine DGEEV.

Definition at line 316 of file eigen.cpp.

References itpp::eig().

bool itpp::eig ( const cmat A,
cvec d,
cmat V 
)

Calculates the eigenvalues and eigenvectors of a complex non-hermitian matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

The eigenvectors are the columns of the matrix V. True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine ZGEEV.

Definition at line 201 of file eigen.cpp.

References it_assert1, and max.

bool itpp::eig ( const cmat A,
cvec d 
)

Calculates the eigenvalues of a complex non-hermitian matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

True is returned if the calculation was successful. Otherwise false.

Uses the LAPACK routine ZGEEV.

Definition at line 225 of file eigen.cpp.

References it_assert1, and max.

cvec itpp::eig ( const cmat A  ) 

Calculates the eigenvalues of a complex non-hermitian matrix.

The Eigenvalues $\mathbf{d}(d_0, d_1, \ldots, d_{n-1})$ and the eigenvectors $\mathbf{v}_i, \: i=0, \ldots, n-1$ of the complex $n \times n$ matrix $\mathbf{A}$ satisfies

\[ \mathbf{A} \mathbf{v}_i = d_i \mathbf{v}_i\: i=0, \ldots, n-1. \]

Uses the LAPACK routine ZGEEV.

Definition at line 323 of file eigen.cpp.

References itpp::eig().

bool itpp::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.

Definition at line 51 of file lu.cpp.

References it_assert1.

Referenced by itpp::det().

bool itpp::lu ( const cmat X,
cmat L,
cmat U,
ivec p 
)

LU factorisation of real matrix.

The LU factorization of the complex 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 elements k and row p(k) should be interchanged.

Returns true is calculation succeeds. False otherwise.

Definition at line 84 of file lu.cpp.

References it_assert1.

void itpp::interchange_permutations ( vec b,
const ivec p 
)

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

Definition at line 133 of file lu.cpp.

References it_assert.

bmat itpp::permutation_matrix ( const ivec p  ) 

Make permutation matrix P from the interchange permutation vector p.

Definition at line 145 of file lu.cpp.

References itpp::eye_b(), and it_assert.

bool itpp::qr ( const mat A,
mat Q,
mat R 
)

QR factorisation of real matrix.

The QR factorization of the real matrix $\mathbf{A}$ of size $m \times n$ is given by

\[ \mathbf{A} = \mathbf{Q} \mathbf{R} , \]

where $\mathbf{Q}$ is an $m \times m$ orthogonal matrix and $\mathbf{R}$ is an $m \times n$ upper triangular matrix.

Returns true is calculation succeeds. False otherwise. Uses the LAPACK routine DGEQRF and DORGQR.

Definition at line 50 of file qr.cpp.

References min.

bool itpp::qr ( const mat A,
mat Q,
mat R,
bmat P 
)

QR factorisation of real matrix with pivoting.

The QR factorization of the real matrix $\mathbf{A}$ of size $m \times n$ is given by

\[ \mathbf{A} \mathbf{P} = \mathbf{Q} \mathbf{R} , \]

where $\mathbf{Q}$ is an $m \times m$ orthogonal matrix, $\mathbf{R}$ is an $m \times n$ upper triangular matrix and $\mathbf{P}$ is an $n \times n$ permutation matrix.

Returns true is calculation succeeds. False otherwise. Uses the LAPACK routines DGEQP3 and DORGQR.

Definition at line 75 of file qr.cpp.

References min.

bool itpp::qr ( const cmat A,
cmat Q,
cmat R 
)

QR factorisation of a complex matrix.

The QR factorization of the complex matrix $\mathbf{A}$ of size $m \times n$ is given by

\[ \mathbf{A} = \mathbf{Q} \mathbf{R} , \]

where $\mathbf{Q}$ is an $m \times m$ unitary matrix and $\mathbf{R}$ is an $m \times n$ upper triangular matrix.

Returns true is calculation succeeds. False otherwise. Uses the LAPACK routines ZGEQRF and ZUNGQR.

Definition at line 108 of file qr.cpp.

References min.

bool itpp::qr ( const cmat A,
cmat Q,
cmat R,
bmat P 
)

QR factorisation of a complex matrix with pivoting.

The QR factorization of the complex matrix $\mathbf{A}$ of size $m \times n$ is given by

\[ \mathbf{A} \mathbf{P} = \mathbf{Q} \mathbf{R} , \]

where $\mathbf{Q}$ is an $m \times m$ unitary matrix, $\mathbf{R}$ is an $m \times n$ upper triangular matrix and $\mathbf{P}$ is an $n \times n$ permutation matrix.

Returns true is calculation succeeds. False otherwise. Uses the LAPACK routines ZGEQP3 and ZUNGQR.

Definition at line 135 of file qr.cpp.

References max, and min.

bool itpp::schur ( const mat A,
mat U,
mat T 
)

Schur decomposition of a real matrix.

This function computes the Schur form of a square real matrix $ \mathbf{A} $. The Schur decomposition satisfies the following equation:

\[ \mathbf{U} \mathbf{T} \mathbf{U}^{T} = \mathbf{A} \]

where: $ \mathbf{U} $ is a unitary, $ \mathbf{T} $ is upper quasi-triangular, and $ \mathbf{U}^{T} $ is the transposed $ \mathbf{U} $ matrix.

The upper quasi-triangular matrix may have $ 2 \times 2 $ blocks on its diagonal.

Uses the LAPACK routine DGEES.

Definition at line 50 of file schur.cpp.

References it_assert1.

Referenced by itpp::schur(), and itpp::sqrtm().

mat itpp::schur ( const mat A  ) 

Schur decomposition of a real matrix.

This function computes the Schur form of a square real matrix $ \mathbf{A} $. The Schur decomposition satisfies the following equation:

\[ \mathbf{U} \mathbf{T} \mathbf{U}^{T} = \mathbf{A} \]

where: $ \mathbf{U} $ is a unitary, $ \mathbf{T} $ is upper quasi-triangular, and $ \mathbf{U}^{T} $ is the transposed $ \mathbf{U} $ matrix.

The upper quasi-triangular matrix may have $ 2 \times 2 $ blocks on its diagonal.

Returns:
Real Schur matrix $ \mathbf{T} $
uses the LAPACK routine DGEES.

Definition at line 118 of file schur.cpp.

References itpp::schur().

bool itpp::schur ( const cmat A,
cmat U,
cmat T 
)

Schur decomposition of a complex matrix.

This function computes the Schur form of a square complex matrix $ \mathbf{A} $. The Schur decomposition satisfies the following equation:

\[ \mathbf{U} \mathbf{T} \mathbf{U}^{H} = \mathbf{A} \]

where: $ \mathbf{U} $ is a unitary, $ \mathbf{T} $ is upper triangular, and $ \mathbf{U}^{H} $ is the Hermitian transposition of the $ \mathbf{U} $ matrix.

Uses the LAPACK routine ZGEES.

Definition at line 77 of file schur.cpp.

References it_assert1.

cmat itpp::schur ( const cmat A  ) 

Schur decomposition of a complex matrix.

This function computes the Schur form of a square complex matrix $ \mathbf{A} $. The Schur decomposition satisfies the following equation:

\[ \mathbf{U} \mathbf{T} \mathbf{U}^{H} = \mathbf{A} \]

where: $ \mathbf{U} $ is a unitary, $ \mathbf{T} $ is upper triangular, and $ \mathbf{U}^{H} $ is the Hermitian transposition of the $ \mathbf{U} $ matrix.

Returns:
Complex Schur matrix $ \mathbf{T} $
Uses the LAPACK routine ZGEES.

Definition at line 125 of file schur.cpp.

References itpp::schur().

bool itpp::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 \]

Definition at line 50 of file svd.cpp.

References max, and min.

Referenced by itpp::norm(), and itpp::svd().

bool itpp::svd ( const cmat A,
vec S 
)

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a complex $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 \]

Definition at line 69 of file svd.cpp.

References max, and min.

vec itpp::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 \]

Definition at line 164 of file svd.cpp.

References itpp::svd().

vec itpp::svd ( const cmat A  ) 

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a complex $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 \]

Definition at line 171 of file svd.cpp.

References itpp::svd().

Referenced by orth().

bool itpp::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 \]

Definition at line 91 of file svd.cpp.

References max, and min.

bool itpp::svd ( const cmat A,
cmat U,
vec S,
cmat V 
)

Singular Value Decomposition (SVD).

The svd-algorithm computes the decomposition of a complex $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 \]

Definition at line 113 of file svd.cpp.

References max, and min.

SourceForge Logo

Generated on Thu Apr 19 14:43:47 2007 for IT++ by Doxygen 1.5.1