|
STK++ 0.9.13
|
The class Svd compute the Singular Value Decomposition of a Array with the Golub-Reinsch Algorithm. More...
#include <STK_Svd.h>

Public Types | |
| typedef ISvd< Svd< Array > > | Base |
| typedef hidden::Traits< Array >::Col | ColVector |
| typedef hidden::Traits< Array >::Row | RowVector |
Public Member Functions | |
| Svd (Array const &A, bool ref=false, bool withU=true, bool withV=true) | |
| Default constructor. | |
| template<class OtherArray > | |
| Svd (ArrayBase< OtherArray > const &A, bool withU=true, bool withV=true) | |
| constructor with other kind of array/expression | |
| Svd (const Svd &S) | |
| Copy Constructor. | |
| virtual | ~Svd () |
| destructor. | |
| Svd & | operator= (const Svd &S) |
| Operator = : overwrite the Svd with S. | |
| bool | runImpl () |
| run the Svd | |
Public Member Functions inherited from STK::ISvd< Svd< Array > > | |
| Type | det () const |
| Type | trace () const |
| Type | norm () const |
| int | rank () const |
| ArrayU const & | U () const |
| ArrayV const & | V () const |
| ArrayD const & | D () const |
| virtual bool | run () |
| implement the run method | |
| void | setData (OtherArray const &A, bool withU=true, bool withV=true) |
| Set a new data set to ISvd class. | |
| OtherArray & | ginv (OtherArray &res) const |
| Compute the generalized inverse of the matrix and put the result in res. | |
Public Member Functions inherited from STK::IRunnerBase | |
| String const & | error () const |
| get the last error message. | |
Public Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| Derived & | asDerived () |
| static cast : return a reference of this with a cast to the derived class. | |
| Derived const & | asDerived () const |
| static cast : return a const reference of this with a cast to the derived class. | |
| Derived * | asPtrDerived () |
static cast : return a ptr on a Derived of this with a cast to the derived class. | |
| Derived const * | asPtrDerived () const |
static cast : return a ptr on a constant Derived of this with a cast to the derived class. | |
| Derived * | clone () const |
| create a leaf using the copy constructor of the Derived class. | |
| Derived * | clone (bool isRef) const |
| create a leaf using the copy constructor of the Derived class and a flag determining if the clone is a reference or not. | |
Static Public Member Functions | |
| static bool | diag (ArrayDiagonalX &D, VectorX &F, Array &U, ArraySquareX &V, bool withU=true, bool withV=true, Real const &tol=Arithmetic< Real >::epsilon()) |
| Computing the diagonalization of a bi-diagonal matrix. | |
| static void | rightEliminate (ArrayDiagonalX &D, VectorX &F, int const &nrow, ArraySquareX &V, bool withV=true, Real const &tol=Arithmetic< Real >::epsilon()) |
| right eliminate the element on the subdiagonal of the row nrow | |
Private Member Functions | |
| bool | computeSvd () |
| Svd main steps. | |
| void | compU () |
| Compute U (if withU_ is true) | |
| void | compV () |
| Compute V (if withV_ is true) | |
Private Attributes | |
| VectorX | F_ |
| Values of the Sub-diagonal. | |
Additional Inherited Members | |
Protected Types inherited from STK::ISvd< Svd< Array > > | |
| typedef hidden::AlgebraTraits< Svd< Array > >::ArrayU | ArrayU |
| typedef hidden::AlgebraTraits< Svd< Array > >::ArrayD | ArrayD |
| typedef hidden::AlgebraTraits< Svd< Array > >::ArrayV | ArrayV |
| typedef ArrayU::Type | Type |
Protected Member Functions inherited from STK::ISvd< Svd< Array > > | |
| ISvd (ArrayU const &A, bool ref, bool withU=true, bool withV=true) | |
| Default constructor. | |
| ISvd (ArrayBase< OtherDerived > const &A, bool withU=true, bool withV=true) | |
| constructor with other kind of array/expression | |
| ISvd (ISvd const &S) | |
| Copy Constructor. | |
| virtual | ~ISvd () |
| destructor. | |
| ISvd & | operator= (const ISvd &S) |
| Operator = : overwrite the ISvd with S. | |
| virtual void | finalize () |
| Finalize any operations that have to be done after the computation of the decomposition. | |
| int | nrowU () const |
| int | ncolU () const |
| int | nrowD () const |
| int | ncolD () const |
| int | nrowV () const |
| int | ncolV () const |
Protected Member Functions inherited from STK::IRunnerBase | |
| IRunnerBase () | |
| default constructor | |
| IRunnerBase (IRunnerBase const &runner) | |
| copy constructor | |
| virtual | ~IRunnerBase () |
| destructor | |
| virtual void | update () |
| update the runner. | |
Protected Member Functions inherited from STK::IRecursiveTemplate< Derived > | |
| IRecursiveTemplate () | |
| constructor. | |
| ~IRecursiveTemplate () | |
| destructor. | |
Protected Attributes inherited from STK::ISvd< Svd< Array > > | |
| ArrayU | U_ |
| U_ matrix. | |
| ArrayV | V_ |
| V_ matrix. | |
| ArrayD | D_ |
| Diagonal array of the singular values. | |
| bool | withU_ |
| Compute U_ ? | |
| bool | withV_ |
| Compute V_ ? | |
| Type | norm_ |
| trace norm | |
| int | rank_ |
| rank | |
| Type | trace_ |
| trace norm | |
| Type | det_ |
| determinant | |
Protected Attributes inherited from STK::IRunnerBase | |
| String | msg_error_ |
| String with the last error message. | |
| bool | hasRun_ |
true if run has been used, false otherwise | |
The class Svd compute the Singular Value Decomposition of a Array with the Golub-Reinsch Algorithm.
The method take as:
| typedef hidden::Traits<Array>::Col STK::Svd< Array >::ColVector |
| typedef hidden::Traits<Array>::Row STK::Svd< Array >::RowVector |
|
inline |
Compute U (if withU_ is true)
Definition at line 386 of file STK_Svd.h.
References STK::dot().
Svd main steps.
Definition at line 235 of file STK_Svd.h.
References STK::IRunnerBase::error().
Compute V (if withV_ is true)
Definition at line 324 of file STK_Svd.h.
References STK::dot().
|
static |
Computing the diagonalization of a bi-diagonal matrix.
| D | the diagonal of the matrix |
| F | the subdiagonal of the matrix |
| U | a left orthogonal Array |
| withU | true if we want to update U |
| V | a right orthogonal Square Array |
| withV | true if we want to update V |
| tol | the tolerance to use |
Definition at line 503 of file STK_Svd.h.
References STK::IArray2D< Derived >::beginRows(), d1, d2, STK::IRunnerBase::error(), STK::IArray2D< Derived >::lastIdxRows(), MAX_ITER, STK::norm(), STK::rightGivens(), STK::sign(), STK::IArray2D< Derived >::swap(), and STK::IArray2D< Derived >::swapCols().
|
static |
right eliminate the element on the subdiagonal of the row nrow
| D | the diagonal of the matrix |
| F | the subdiagonal of the matrix |
| nrow | the number of the row were we want to rightEliminate |
| V | a right orthogonal Square Array |
| withV | true if we want to update V |
| tol | the tolerance to use |
Definition at line 436 of file STK_Svd.h.
References STK::norm(), and STK::rightGivens().