yat  0.17pre
theplu::yat::utility::SVD Class Reference

Singular Value Decomposition. More...

`#include <yat/utility/SVD.h>`

## Public Types

enum  SVDalgorithm { GolubReinsch, ModifiedGolubReinsch, Jacobi }

## Public Member Functions

SVD (const Matrix &Ain)
Constructs an SVD object using the matrix Ain as only input. The input matrix is copied for further use in the object. More...

~SVD (void)
The destructor.

void decompose (SVDalgorithm algo=GolubReinsch)
This function will perform SVD with the method specified by algo. More...

const Vectors (void) const

void solve (const VectorBase &b, Vector &x)
Solve the system using the decomposition of A. More...

const MatrixU (void) const

const MatrixV (void) const

## Detailed Description

Singular Value Decomposition.

Class encapsulating GSL methods for singular value decomposition, SVD.

A = U S V' = (MxN)(NxN)(NxN) = (MxN)

A = Matrix to be decomposed, size MxN
U = Orthogonal matrix, size MxN
S = Diagonal matrix of singular values, size NxN
V = Orthogonal matrix, size NxN

## Member Enumeration Documentation

A number of SVD algorithms are implemented in GSL. They have their strengths and weaknesses.

GSL's SVD documentation.

## Constructor & Destructor Documentation

 theplu::yat::utility::SVD::SVD ( const Matrix & Ain )
explicit

Constructs an SVD object using the matrix Ain as only input. The input matrix is copied for further use in the object.

Note
Number of rows must be equal or larger than number of columns.

## Member Function Documentation

 void theplu::yat::utility::SVD::decompose ( SVDalgorithm algo = `GolubReinsch` )

This function will perform SVD with the method specified by algo.

Exceptions
 GSL_error if the underlying GSL function fails.
 const Vector& theplu::yat::utility::SVD::s ( void ) const

Returns
A copy of the s vector.
Note
If decompose() has not been run the outcome of the call is undefined.
 void theplu::yat::utility::SVD::solve ( const VectorBase & b, Vector & x )

Solve the system using the decomposition of A.

Note
If decompose() has not been run the outcome of the call is undefined.
Exceptions
 GSL_error if the underlying GSL function fails.
 const Matrix& theplu::yat::utility::SVD::U ( void ) const

Returns
A copy of the U matrix.
Note
If decompose() has not been run the outcome of the call is undefined.
 const Matrix& theplu::yat::utility::SVD::V ( void ) const

Generated on Wed Jul 17 2019 02:25:34 for yat by 1.8.11