last update 20 Sep 2009 |
#include <cvrMinimizeBasis.h>
Classes | |
class | parameters |
The parameters for the class minimizeBasis. More... | |
Public Types | |
enum | eDeviationType { Element, Vector, Matrix } |
Public Member Functions | |
minimizeBasis () | |
minimizeBasis (const parameters &par) | |
minimizeBasis (const minimizeBasis &other) | |
virtual | ~minimizeBasis () |
template<typename T > | |
bool | apply (const matrix< T > &testVectors, matrix< T > &newBasis, matrix< T > &factors) const |
minimizeBasis & | copy (const minimizeBasis &other) |
minimizeBasis & | operator= (const minimizeBasis &other) |
const std::string & | name () const |
virtual minimizeBasis * | clone () const |
virtual minimizeBasis * | newInstance () const |
const parameters & | getParameters () const |
Protected Member Functions | |
template<typename T > | |
T | computeError (const eDeviationType &deviation, const matrix< T > &shouldBe, const matrix< T > ¤t) const |
This functor generates a minimum number of basis vectors to approximate a given set of vectors within a given deviation.
There is a Fast and an Exact method of computing the minimized basis. Normally the Exact method should be used, because it does not only compute the exact solution and the smallest basis, but may even be faster than the "Fast" method. The "Fast" method is not exact and may return a basis which is larger than necessary.
Enumeration of deviation types.
Element | the elements of the approximating vectors must not deviate more than maxDeviation |
Vector | the l2VectorNorm of deviation vector between the approximated vector must not be larger than maxDeviation |
Matrix | the l2MatrixNorm of the difference matrix between the approximating and the approximated set of vectors must not be larger than maxDeviation |
cvr::minimizeBasis::minimizeBasis | ( | ) |
Default constructor.
cvr::minimizeBasis::minimizeBasis | ( | const parameters & | par | ) |
Construct a functor using the given parameters.
cvr::minimizeBasis::minimizeBasis | ( | const minimizeBasis & | other | ) |
virtual cvr::minimizeBasis::~minimizeBasis | ( | ) | [virtual] |
Destructor.
bool cvr::minimizeBasis::apply | ( | const matrix< T > & | testVectors, | |
matrix< T > & | newBasis, | |||
matrix< T > & | factors | |||
) | const [inline] |
Operates on the given parameter.
testVectors | the rows of this matrix should contain the vectors to be approximated | |
newBasis | the columns of this matrix will contain the new basis vectors | |
factors | the rows of this matrix will contain the factors to multiply the new basis vectors by to approximate the testVectors |
virtual minimizeBasis* cvr::minimizeBasis::clone | ( | ) | const [virtual] |
T cvr::minimizeBasis::computeError | ( | const eDeviationType & | deviation, | |
const matrix< T > & | shouldBe, | |||
const matrix< T > & | current | |||
) | const [inline, protected] |
Compute error depending on the given deviation type.
minimizeBasis& cvr::minimizeBasis::copy | ( | const minimizeBasis & | other | ) |
const parameters& cvr::minimizeBasis::getParameters | ( | ) | const |
const std::string& cvr::minimizeBasis::name | ( | ) | const [virtual] |
virtual minimizeBasis* cvr::minimizeBasis::newInstance | ( | ) | const [virtual] |
minimizeBasis& cvr::minimizeBasis::operator= | ( | const minimizeBasis & | other | ) |