IT++ Logo
Functions
Matrix Decompositions
Linear Algebra

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)
 Calculates the eigenvalues and eigenvectors of a real non-symmetric matrix.
 
bool itpp::eig (const mat &A, cvec &d)
 Calculates the eigenvalues of a real non-symmetric matrix.
 
cvec itpp::eig (const mat &A)
 Calculates 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 interchange 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 &R)
 QR factorisation of real matrix with suppressed evaluation of Q.
 
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 &R)
 QR factorisation of complex matrix with suppressed evaluation of Q.
 
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)
 Get singular values s of a real matrix A using SVD.
 
bool itpp::svd (const cmat &A, vec &s)
 Get singular values s of a complex matrix A using SVD.
 
vec itpp::svd (const mat &A)
 Return singular values of a real matrix A using SVD.
 
vec itpp::svd (const cmat &A)
 Return singular values of a complex matrix A using SVD.
 
bool itpp::svd (const mat &A, mat &U, vec &s, mat &V)
 Perform Singular Value Decomposition (SVD) of a real matrix A.
 
bool itpp::svd (const cmat &A, cmat &U, vec &s, cmat &V)
 Perform Singular Value Decomposition (SVD) of a complex matrix A.
 

Detailed Description

Function Documentation

ITPP_EXPORT 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 triangular $n \times n$ matrix.

Returns true if calculation succeeded. False otherwise.

Definition at line 86 of file cholesky.cpp.

References it_error.

Referenced by itpp::chol().

ITPP_EXPORT 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 triangular $n \times n$ matrix.

Definition at line 111 of file cholesky.cpp.

References itpp::chol(), and it_warning.

ITPP_EXPORT 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 triangular $n \times n$ matrix.

Returns true if calculation 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 92 of file cholesky.cpp.

References it_error.

ITPP_EXPORT 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 triangular $n \times n$ matrix.

Definition at line 101 of file cholesky.cpp.

References itpp::chol(), and it_warning.

ITPP_EXPORT 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 252 of file eigen.cpp.

References it_error.

Referenced by itpp::eig_sym(), mpower(), and pcamat().

ITPP_EXPORT 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 258 of file eigen.cpp.

References it_error.

ITPP_EXPORT 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 303 of file eigen.cpp.

References itpp::eig_sym().

ITPP_EXPORT 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 264 of file eigen.cpp.

References it_error.

ITPP_EXPORT 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 270 of file eigen.cpp.

References it_error.

ITPP_EXPORT 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 310 of file eigen.cpp.

References itpp::eig_sym().

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

Calculates 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 277 of file eigen.cpp.

References it_error.

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

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

Calculates 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 283 of file eigen.cpp.

References it_error.

ITPP_EXPORT cvec itpp::eig ( const mat &  A)

Calculates 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 318 of file eigen.cpp.

References itpp::eig().

ITPP_EXPORT 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 289 of file eigen.cpp.

References it_error.

ITPP_EXPORT 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 295 of file eigen.cpp.

References it_error.

ITPP_EXPORT 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 325 of file eigen.cpp.

References itpp::eig().

ITPP_EXPORT 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 permutation matrix can be constructed using the function

bmat permutation_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 triangular, 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 117 of file lu.cpp.

References it_error.

Referenced by itpp::det().

ITPP_EXPORT 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 permutation matrix can be constructed using the function

bmat permutation_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 triangular, 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 123 of file lu.cpp.

References it_error.

ITPP_EXPORT 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 303 of file qr.cpp.

References it_error.

ITPP_EXPORT bool itpp::qr ( const mat &  A,
mat &  R 
)

QR factorisation of real matrix with suppressed evaluation of Q.

For certain type of applications only the $\mathbf{R}$ matrix of full QR factorization of the real matrix $\mathbf{A}=\mathbf{Q}\mathbf{R}$ is needed. These situations arise typically in designs of square-root algorithms where it is required that $\mathbf{A}^{T}\mathbf{A}=\mathbf{R}^{T}\mathbf{R}$. In such cases, evaluation of $\mathbf{Q}$ can be skipped.

Modification of qr(A,Q,R).

Author
Vasek Smidl

Definition at line 309 of file qr.cpp.

References it_error.

ITPP_EXPORT 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 315 of file qr.cpp.

References it_error.

ITPP_EXPORT 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 321 of file qr.cpp.

References it_error.

ITPP_EXPORT bool itpp::qr ( const cmat &  A,
cmat &  R 
)

QR factorisation of complex matrix with suppressed evaluation of Q.

For certain type of applications only the $\mathbf{R}$ matrix of full QR factorization of the complex matrix $\mathbf{A}=\mathbf{Q}\mathbf{R}$ is needed. These situations arise typically in designs of square-root algorithms where it is required that $\mathbf{A}^{H}\mathbf{A}=\mathbf{R}^{H}\mathbf{R}$. In such cases, evaluation of $\mathbf{Q}$ can be skipped.

Modification of qr(A,Q,R).

Author
Vasek Smidl

Definition at line 327 of file qr.cpp.

References it_error.

ITPP_EXPORT 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 333 of file qr.cpp.

References it_error.

ITPP_EXPORT 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 104 of file schur.cpp.

References it_error.

Referenced by itpp::schur().

ITPP_EXPORT 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 119 of file schur.cpp.

References itpp::schur().

ITPP_EXPORT 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 111 of file schur.cpp.

References it_error.

ITPP_EXPORT 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 127 of file schur.cpp.

References itpp::schur().

ITPP_EXPORT bool itpp::svd ( const mat &  A,
vec &  s 
)

Get singular values s of a real matrix A using SVD.

This function calculates singular values $s$ from the SVD decomposition of a real matrix $A$. The SVD algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

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

where $\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}^T \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 185 of file svd.cpp.

References it_error.

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

ITPP_EXPORT bool itpp::svd ( const cmat &  A,
vec &  s 
)

Get singular values s of a complex matrix A using SVD.

This function calculates singular values $s$ from the SVD decomposition of a complex matrix $A$. The SVD algorithm computes the decomposition of a complex $m \times n$ matrix $\mathbf{A}$ so that

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

where $\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 \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 191 of file svd.cpp.

References it_error.

ITPP_EXPORT vec itpp::svd ( const mat &  A)

Return singular values of a real matrix A using SVD.

This function returns singular values from the SVD decomposition of a real matrix $A$. The SVD algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

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

where $\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}^T \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 211 of file svd.cpp.

References itpp::svd().

ITPP_EXPORT vec itpp::svd ( const cmat &  A)

Return singular values of a complex matrix A using SVD.

This function returns singular values from the SVD decomposition of a complex matrix $A$. The SVD algorithm computes the decomposition of a complex $m \times n$ matrix $\mathbf{A}$ so that

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

where $\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 \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 218 of file svd.cpp.

References itpp::svd().

ITPP_EXPORT bool itpp::svd ( const mat &  A,
mat &  U,
vec &  s,
mat &  V 
)

Perform Singular Value Decomposition (SVD) of a real matrix A.

This function returns two orthonormal matrices $U$ and $V$ and a vector of singular values $s$. The SVD algorithm computes the decomposition of a real $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathrm{diag}(\mathbf{U}^T \mathbf{A} \mathbf{V}) = \mathbf{s} = \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}^T \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 197 of file svd.cpp.

References it_error.

ITPP_EXPORT bool itpp::svd ( const cmat &  A,
cmat &  U,
vec &  s,
cmat &  V 
)

Perform Singular Value Decomposition (SVD) of a complex matrix A.

This function returns two orthonormal matrices $U$ and $V$ and a vector of singular values $s$. The SVD algorithm computes the decomposition of a complex $m \times n$ matrix $\mathbf{A}$ so that

\[ \mathrm{diag}(\mathbf{U}^H \mathbf{A} \mathbf{V}) = \mathbf{s} = \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 \]

where $ \mathrm{diag}(\mathbf{S}) = \mathbf{s} $

Note
An external LAPACK library is required by this function.

Definition at line 203 of file svd.cpp.

References it_error.

SourceForge Logo

Generated on Sat Jul 6 2013 10:54:29 for IT++ by Doxygen 1.8.2