|
STK++ 0.9.13
|
This class perform a weighted svd decomposition. More...
#include <STK_WeightedSvd.h>

Public Types | |
| typedef ISvd< WeightedSvd< Array, WRows, WCols > > | Base |
Public Member Functions | |
| WeightedSvd (Array const &a, WRows const &wrows, WCols const &wcols, int dim) | |
| default constructor. | |
| virtual | ~WeightedSvd () |
| destructor | |
| virtual bool | run () |
| run the weighted svd | |
Public Member Functions inherited from STK::ISvd< WeightedSvd< Array, WRows, WCols > > | |
| Type | det () const |
| Type | trace () const |
| Type | norm () const |
| int | rank () const |
| ArrayU const & | U () const |
| ArrayV const & | V () const |
| ArrayD const & | D () const |
| 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. | |
Private Attributes | |
| CVectorX | wrows_ |
| rows weights | |
| CPointX | wcols_ |
| columns weights | |
| int | dim_ |
| number of eigenvectors (left and right) | |
Additional Inherited Members | |
Protected Types inherited from STK::ISvd< WeightedSvd< Array, WRows, WCols > > | |
| typedef hidden::AlgebraTraits< WeightedSvd< Array, WRows, WCols > >::ArrayU | ArrayU |
| typedef hidden::AlgebraTraits< WeightedSvd< Array, WRows, WCols > >::ArrayD | ArrayD |
| typedef hidden::AlgebraTraits< WeightedSvd< Array, WRows, WCols > >::ArrayV | ArrayV |
| typedef ArrayU::Type | Type |
Protected Member Functions inherited from STK::ISvd< WeightedSvd< Array, WRows, WCols > > | |
| 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< WeightedSvd< Array, WRows, WCols > > | |
| 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 | |
This class perform a weighted svd decomposition.
Definition at line 59 of file STK_WeightedSvd.h.
| typedef ISvd< WeightedSvd<Array, WRows, WCols> > STK::WeightedSvd< Array, WRows, WCols >::Base |
Definition at line 62 of file STK_WeightedSvd.h.
|
inline |
default constructor.
The matrix U_ will be weigthed by this constructor on the fly. The decomposition will be achieved using lapack (if present) or STK++ implementations (otherwise) when the methode @© run is called.
| a | the matrix to decompose |
| wrows,wcols | weights of the rows and columns |
| dim | the number of left and right eigenVectors required |
Definition at line 74 of file STK_WeightedSvd.h.
References STK::WeightedSvd< Array, WRows, WCols >::dim_, STK::ICArray< Derived >::resize(), STK::ISvd< WeightedSvd< Array, WRows, WCols > >::U_, STK::WeightedSvd< Array, WRows, WCols >::wcols_, and STK::WeightedSvd< Array, WRows, WCols >::wrows_.
|
inlinevirtual |
|
inlinevirtual |
run the weighted svd
Reimplemented from STK::ISvd< WeightedSvd< Array, WRows, WCols > >.
Definition at line 88 of file STK_WeightedSvd.h.
References STK::ISvd< WeightedSvd< Array, WRows, WCols > >::D_, STK::ArrayBase< Derived >::diagonalize(), STK::ISvd< Derived >::run(), STK::IRegression< YArray, XArray, Weights >::run(), STK::ISvd< WeightedSvd< Array, WRows, WCols > >::U_, STK::ISvd< WeightedSvd< Array, WRows, WCols > >::V_, STK::WeightedSvd< Array, WRows, WCols >::wcols_, STK::ISvd< WeightedSvd< Array, WRows, WCols > >::withU_, STK::ISvd< WeightedSvd< Array, WRows, WCols > >::withV_, and STK::WeightedSvd< Array, WRows, WCols >::wrows_.
|
private |
number of eigenvectors (left and right)
Definition at line 131 of file STK_WeightedSvd.h.
Referenced by STK::WeightedSvd< Array, WRows, WCols >::WeightedSvd().
|
private |
columns weights
Definition at line 129 of file STK_WeightedSvd.h.
Referenced by STK::WeightedSvd< Array, WRows, WCols >::run(), and STK::WeightedSvd< Array, WRows, WCols >::WeightedSvd().
|
private |
rows weights
Definition at line 127 of file STK_WeightedSvd.h.
Referenced by STK::WeightedSvd< Array, WRows, WCols >::run(), and STK::WeightedSvd< Array, WRows, WCols >::WeightedSvd().