Templates -- Meow  1.1.4
A C++ template which is unable and also not allowed to compile to obj-file first.
meow::Transformation< Scalar > Class Template Referenceabstract

A base class for implementing kinds of transformations. More...

#include "Transformation.h"

Inheritance diagram for meow::Transformation< Scalar >:
meow::BallProjection< Scalar > meow::LinearTransformation< Scalar > meow::PhotoProjection< Scalar > meow::Rotation3D< Scalar >

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)
 
TransformationcopyFrom (Transformation const &b)
 Copy from the specified one. More...
 
TransformationreferenceFrom (Transformation const &b)
 reference from the specified one More...
 

Detailed Description

template<class Scalar>
class meow::Transformation< Scalar >

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.

Author
cat_leopard

Definition at line 21 of file Transformation.h.

Constructor & Destructor Documentation

template<class Scalar>
meow::Transformation< Scalar >::Transformation ( size_t  inputRows,
size_t  inputCols,
size_t  outputRows,
size_t  outputCols,
size_t  psize 
)
inlineprotected

Construct and setup

Parameters
[in]inputRowsnumber of rows of the input matrix.
[in]inputColsnumber of columns of the input matrix.
[in]outputRowsnumber of rows of the output matrix.
[in]outputColsnumber of columns of the output matrix.
[in]psizenumber of parameters

Definition at line 55 of file Transformation.h.

template<class Scalar>
meow::Transformation< Scalar >::Transformation ( Transformation< Scalar > const &  b)
inlineprotected

Construct and copy setings from another transformation class.

Parameters
[in]bSpecify where to copy the informations.

Definition at line 65 of file Transformation.h.

template<class Scalar>
virtual meow::Transformation< Scalar >::~Transformation ( )
inlinevirtual

Destructor

Definition at line 94 of file Transformation.h.

Member Function Documentation

template<class Scalar>
Transformation& meow::Transformation< Scalar >::copyFrom ( Transformation< Scalar > const &  b)
inlineprotected

Copy from the specified one.

Parameters
[in]bThe specified one
Returns
*this

Definition at line 75 of file Transformation.h.

template<class Scalar>
size_t meow::Transformation< Scalar >::inputCols ( ) const
inline

Return the number of columns of the input matrix.

Returns
Number of columns.

Definition at line 111 of file Transformation.h.

template<class Scalar>
size_t meow::Transformation< Scalar >::inputRows ( ) const
inline

Return the number of rows of the input matrix.

Returns
Number of rows.

Definition at line 102 of file Transformation.h.

template<class Scalar>
virtual bool meow::Transformation< Scalar >::inversable ( ) const
inlinevirtual

Return whether this transformation is inversable or not.

Returns
false

Definition at line 201 of file Transformation.h.

template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::jacobian ( Matrix< Scalar > const &  x) const
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.

Parameters
[in]xThe input matrix.
Returns
An empty 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.

template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::jacobian ( Matrix< Scalar > const &  x,
size_t  i 
) const
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.

Parameters
[in]xThe input matrix.
[in]iThe index of the specified parameter.
Returns
An empty 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 192 of file Transformation.h.

template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::jacobianInv ( Matrix< Scalar > const &  x) const
inlinevirtual

Return the jacobian matrix of the inverse transformation.

Parameters
[in]xThe input matirx
Returns
An empty matrix

Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.

Definition at line 219 of file Transformation.h.

template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::jacobianInv ( Matrix< Scalar > const &  x,
size_t  i 
) const
inlinevirtual

Return the jacobian matrix of the inverse transformation.

Parameters
[in]xThe input matirx
[in]iThe index of the specified parameter.
Returns
An empty matrix

Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.

Definition at line 230 of file Transformation.h.

template<class Scalar>
size_t meow::Transformation< Scalar >::outputCols ( ) const
inline

Return the number of columns of the output matrix.

Returns
Number of columns.

Definition at line 129 of file Transformation.h.

template<class Scalar>
size_t meow::Transformation< Scalar >::outputRows ( ) const
inline

Return the number of rows of the output matrix.

Returns
Number of rows.

Definition at line 120 of file Transformation.h.

template<class Scalar>
virtual Scalar meow::Transformation< Scalar >::parameter ( size_t  i) const
pure virtual

Get the i -th parameter.

Parameters
[in]iThe index of the specified parameter.
Note
It's a pure virtual method.

Implemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::BallProjection< Scalar >, meow::BallProjection< double >, meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.

template<class Scalar>
virtual Scalar meow::Transformation< Scalar >::parameter ( size_t  i,
Scalar const &  s 
)
pure virtual

Setup the i -th parameter.

Parameters
[in]iThe index of the specified parameter.
[in]sThe new value to the specified parameter.
Note
It's a pure virtual method.

Implemented in meow::PhotoProjection< Scalar >, meow::PhotoProjection< double >, meow::BallProjection< Scalar >, meow::BallProjection< double >, meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.

template<class Scalar>
size_t meow::Transformation< Scalar >::parameterSize ( ) const
inline

Return the number of parameters.

Returns
Number of parameters.

Definition at line 138 of file Transformation.h.

template<class Scalar>
Transformation& meow::Transformation< Scalar >::referenceFrom ( Transformation< Scalar > const &  b)
inlineprotected

reference from the specified one

Parameters
[in]bThe specified one
Returns
*this

Definition at line 86 of file Transformation.h.

template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::transformate ( Matrix< Scalar > const &  x) const
pure virtual
template<class Scalar>
virtual Matrix<Scalar> meow::Transformation< Scalar >::transformateInv ( Matrix< Scalar > const &  x) const
inlinevirtual

Do the inverse transformation.

Parameters
[in]xThe input matirx
Returns
An empty matrix

Reimplemented in meow::Rotation3D< Scalar >, and meow::Rotation3D< double >.

Definition at line 209 of file Transformation.h.


The documentation for this class was generated from the following file: