Templates -- Meow
1.1.2
不能,也不應該先編譯成obj-file的templates
|
A ball projection is to project the given vector to a hyper-sphere. More...
#include "Transformations.h"
Public Member Functions | |
BallProjection (BallProjection const &b) | |
BallProjection (size_t d) | |
BallProjection (size_t d, Scalar const &r) | |
BallProjection & | copyFrom (BallProjection const &b) |
Copy settings from another one. More... | |
BallProjection & | referenceFrom (BallProjection const &b) |
Reference settings from another one. More... | |
Scalar | parameter (size_t i) const |
same as radius() More... | |
Scalar | parameter (size_t i, Scalar const &s) |
same as radius(s) More... | |
Scalar | radius () const |
Return the value of the radius. More... | |
Scalar | radius (Scalar const &r) |
Setup the radius. More... | |
size_t | dimension () const |
Get the dimension of this projection. More... | |
Matrix< Scalar > | transformate (Matrix< Scalar > const &x) const |
Project the input vector(s) onto the hyper-sphere and return it. More... | |
Matrix< Scalar > | jacobian (Matrix< Scalar > const &x) const |
Return the jacobian matrix (derivate by the input vector) of this projection. More... | |
Matrix< Scalar > | jacobian (Matrix< Scalar > const &x, size_t i) const |
Return the jacobian matrix (derivate by radius) of this projection. More... | |
BallProjection & | operator= (BallProjection const &b) |
Same as copyFrom(b) More... | |
Matrix< Scalar > | operator() (Matrix< Scalar > const &v) const |
Same as transformate(v) More... | |
Public Member Functions inherited from meow::Transformation< Scalar > | |
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 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... | |
Additional Inherited Members | |
Protected Member Functions inherited from meow::Transformation< Scalar > | |
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 ball projection is to project the given vector to a hyper-sphere.
Assume:
Then the transformation is like below:
where
|
inline |
Constructor, copy settings from given BallProjection
[in] | b | another ball projection class |
|
inline |
Constructor and setup, radius = 1
[in] | d | Dimension of the input/output vector |
|
inline |
Constructor and setup
[in] | d | Dimension of the input/output vector |
[in] | r | Radius of the hyper-sphere |
|
inline |
Copy settings from another one.
[in] | b | Another one |
*this
|
inline |
Get the dimension of this projection.
|
inlinevirtual |
Return the jacobian matrix (derivate by the input vector) of this projection.
This method only allow a vector-like matrix be input. Assume:
Then the jacobian matrix is like below:
[in] | x | The input matrix. |
Reimplemented from meow::Transformation< Scalar >.
|
inlinevirtual |
Return the jacobian matrix (derivate by radius) of this projection.
This method only allow a vector-like matrix be input. Assume:
Then the jacobian matrix is like below:
[in] | x | The input matrix. |
[in] | i | Useless parameter |
Reimplemented from meow::Transformation< Scalar >.
|
inline |
Same as transformate(v)
|
inline |
Same as copyFrom(b)
|
inlinevirtual |
same as radius()
Implements meow::Transformation< Scalar >.
|
inlinevirtual |
same as radius(s)
Implements meow::Transformation< Scalar >.
|
inline |
Return the value of the radius.
|
inline |
Setup the radius.
[in] | r | New value of the radius |
|
inline |
Reference settings from another one.
[in] | b | Another one |
*this
|
inlinevirtual |
Project the input vector(s) onto the hyper-sphere and return it.
If the number of columns of the input matrix is larger than 1, this method will think that you want to transform multiple vector once and the number of columns of the output matrix will be the same of the number of columns of the input one.
[in] | x | The input matrix. |
Implements meow::Transformation< Scalar >.