last update 20 Sep 2009 |
#include <cvrSVD.h>
Public Member Functions | |
parameters () | |
parameters (const parameters &other) | |
~parameters () | |
const std::string & | name () const |
parameters & | copy (const parameters &other) |
parameters & | operator= (const parameters &other) |
virtual parameters * | clone () const |
virtual parameters * | newInstance () const |
virtual bool | read (ioHandler &handler, const bool complete=true) |
virtual bool | write (ioHandler &handler, const bool complete=true) const |
Public Attributes | |
bool | sort |
bool | transposeU |
bool | transposeV |
LAPACK options | |
The following attributes are considered if the LAPACK library is detected, and otherwise just ignored. | |
bool | useDivideAndConquer |
bool | useMinDimensions |
cvr::svd::svd::parameters::parameters | ( | ) |
Default constructor.
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
cvr::svd::svd::parameters::parameters | ( | const parameters & | other | ) |
Copy constructor.
other | the parameters object to be copied |
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
cvr::svd::svd::parameters::~parameters | ( | ) | [virtual] |
virtual parameters* cvr::svd::svd::parameters::clone | ( | ) | const [virtual] |
Returns a pointer to a clone of the parameters.
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
parameters& cvr::svd::svd::parameters::copy | ( | const parameters & | other | ) |
copy the contents of a parameters object
other | the parameters object to be copied |
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
const std::string& cvr::svd::svd::parameters::name | ( | ) | const [virtual] |
returns name of this type
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
virtual parameters* cvr::svd::svd::parameters::newInstance | ( | ) | const [virtual] |
Returns a pointer to a clone of the parameters.
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
parameters& cvr::svd::svd::parameters::operator= | ( | const parameters & | other | ) | [inline] |
Assigns the contents of the other object to this object.
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
virtual bool cvr::svd::svd::parameters::read | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | [virtual] |
Read the parameters from the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also read, otherwise only the data block will be read. |
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
virtual bool cvr::svd::svd::parameters::write | ( | ioHandler & | handler, | |
const bool | complete = true | |||
) | const [virtual] |
Write the parameters in the given ioHandler.
handler | the ioHandler to be used | |
complete | if true (the default) the enclosing begin/end will be also written, otherwise only the data block will be written. |
Reimplemented from cvr::linearAlgebraFunctor::linearAlgebraFunctor::parameters.
bool cvr::svd::svd::parameters::sort |
If true, singular values and corresponding singular vectors are rearranged so that singular values have descending order.
Default is false.
bool cvr::svd::svd::parameters::transposeU |
Specifies whether U (false) or Ut (true) is returned.
It is faster to return Ut.
Default is false, ie U.
bool cvr::svd::svd::parameters::transposeV |
Specifies whether V (false) or Vt (true) is returned.
It is faster to return V.
Default is false, ie V.
bool cvr::svd::svd::parameters::useDivideAndConquer |
If true
the divide-and-conquer method for calculating the SVD is used.
This is generally faster, especially on large matrices. However, it uses more temporary memory than the simple method. Thus, if the computation fails due to memory problems setting this parameter to false
might solve the problem.
Default value: true
bool cvr::svd::svd::parameters::useMinDimensions |
Let the data matrix have M rows and N columns.
Then, usually, U will be an MxM orthogonal matrix and V an NxN orthogonal matrix. However, there are only min(M,N) singular values. For most applications it suffices to calculate only min(M,N) left and right singular vectors, which is done when useMinDimensions
is true (default). All singular values are calculated when false.
Default value: true