Templates -- Meow
1.1.4
A C++ template which is unable and also not allowed to compile to obj-file first.
|
A base class for implementing kinds of transformations. More...
#include "Transformation.h"
Public Member Functions | |
virtual | ~Transformation () |
size_t | inputRows () const |
Return the number of rows of the input matrix. More... | |
size_t | inputCols () const |
Return the number of columns of the input matrix. More... | |
size_t | outputRows () const |
Return the number of rows of the output matrix. More... | |
size_t | outputCols () const |
Return the number of columns of the output matrix. More... | |
size_t | parameterSize () const |
Return the number of parameters. More... | |
virtual Scalar | parameter (size_t i) const =0 |
Get the i -th parameter. More... | |
virtual Scalar | parameter (size_t i, Scalar const &s)=0 |
Setup the i -th parameter. More... | |
virtual Matrix< Scalar > | transformate (Matrix< Scalar > const &x) const =0 |
Do transformate. More... | |
virtual Matrix< Scalar > | jacobian (Matrix< Scalar > const &x) const |
Calculate the jacobian matrix (derivate by the input matrix) of the transformation. More... | |
virtual Matrix< Scalar > | jacobian (Matrix< Scalar > const &x, size_t i) const |
Calculate the jacobian matrix (derivate by the i -th parameter) of the transformation. More... | |
virtual bool | inversable () const |
Return whether this transformation is inversable or not. More... | |
virtual Matrix< Scalar > | transformateInv (Matrix< Scalar > const &x) const |
Do the inverse transformation. More... | |
virtual Matrix< Scalar > | jacobianInv (Matrix< Scalar > const &x) const |
Return the jacobian matrix of the inverse transformation. More... | |
virtual Matrix< Scalar > | jacobianInv (Matrix< Scalar > const &x, size_t i) const |
Return the jacobian matrix of the inverse transformation. More... | |
Protected Member Functions | |
Transformation (size_t inputRows, size_t inputCols, size_t outputRows, size_t outputCols, size_t psize) | |
Transformation (Transformation const &b) | |
Transformation & | copyFrom (Transformation const &b) |
Copy from the specified one. More... | |
Transformation & | referenceFrom (Transformation const &b) |
reference from the specified one More... | |
A base class for implementing kinds of transformations.
We define that the input and output form of our transformations all be matrix . Some advance methods such as calculating jacobian matrix will require that the input form must be a vector.
Definition at line 21 of file Transformation.h.
|
inlineprotected |
Construct and setup
[in] | inputRows | number of rows of the input matrix. |
[in] | inputCols | number of columns of the input matrix. |
[in] | outputRows | number of rows of the output matrix. |
[in] | outputCols | number of columns of the output matrix. |
[in] | psize | number of parameters |
Definition at line 55 of file Transformation.h.
|
inlineprotected |
Construct and copy setings from another transformation class.
[in] | b | Specify where to copy the informations. |
Definition at line 65 of file Transformation.h.
|
inlinevirtual |
Destructor
Definition at line 94 of file Transformation.h.
|
inlineprotected |
Copy from the specified one.
[in] | b | The specified one |
*this
Definition at line 75 of file Transformation.h.
|
inline |
Return the number of columns of the input matrix.
Definition at line 111 of file Transformation.h.
|
inline |
Return the number of rows of the input matrix.
Definition at line 102 of file Transformation.h.
|
inlinevirtual |
Return whether this transformation is inversable or not.
false
Definition at line 201 of file Transformation.h.
|
inlinevirtual |
Calculate the jacobian matrix (derivate by the input matrix) of the transformation.
Consider the case of a non-differentiable transformation might be implemented, we return an empty matrix now instead of making it be a pure virtual method.
[in] | x | The input matrix. |
Reimplemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::Rotation3D< Scalar >, meow::Rotation3D< double >, meow::BallProjection< Scalar >, and meow::BallProjection< double >.
Definition at line 177 of file Transformation.h.
|
inlinevirtual |
Calculate the jacobian matrix (derivate by the i -th parameter) of the transformation.
Consider the case of a non-differentiable transformation might be implemented, we return an empty matrix now instead of making it be a pure virtual method.
[in] | x | The input matrix. |
[in] | i | The index of the specified parameter. |
Reimplemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::Rotation3D< Scalar >, meow::Rotation3D< double >, meow::BallProjection< Scalar >, and meow::BallProjection< double >.
Definition at line 192 of file Transformation.h.
|
inlinevirtual |
Return the jacobian matrix of the inverse transformation.
[in] | x | The input matirx |
Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.
Definition at line 219 of file Transformation.h.
|
inlinevirtual |
Return the jacobian matrix of the inverse transformation.
[in] | x | The input matirx |
[in] | i | The index of the specified parameter. |
Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.
Definition at line 230 of file Transformation.h.
|
inline |
Return the number of columns of the output matrix.
Definition at line 129 of file Transformation.h.
|
inline |
Return the number of rows of the output matrix.
Definition at line 120 of file Transformation.h.
|
pure virtual |
Get the i -th parameter.
[in] | i | The index of the specified parameter. |
Implemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::BallProjection< Scalar >, meow::BallProjection< double >, meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.
|
pure virtual |
Setup the i -th parameter.
[in] | i | The index of the specified parameter. |
[in] | s | The new value to the specified parameter. |
Implemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::BallProjection< Scalar >, meow::BallProjection< double >, meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.
|
inline |
Return the number of parameters.
Definition at line 138 of file Transformation.h.
|
inlineprotected |
reference from the specified one
[in] | b | The specified one |
*this
Definition at line 86 of file Transformation.h.
|
pure virtual |
Do transformate.
[in] | x | The input matrix. |
Implemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::Rotation3D< Scalar >, meow::Rotation3D< double >, meow::BallProjection< Scalar >, and meow::BallProjection< double >.
|
inlinevirtual |
Do the inverse transformation.
[in] | x | The input matirx |
Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.
Definition at line 209 of file Transformation.h.