GTSAM  4.0.2
C++ library for smoothing and mapping (SAM)
Public Types | Public Member Functions | List of all members
gtsam::ParameterMatrix< M > Class Template Reference

#include <ParameterMatrix.h>

Public Types

enum  { dimension = Eigen::Dynamic }
 

Public Member Functions

 ParameterMatrix (const size_t N)
 
 ParameterMatrix (const MatrixType &matrix)
 
size_t rows () const
 Get the number of rows.
 
size_t cols () const
 Get the number of columns.
 
MatrixType matrix () const
 Get the underlying matrix.
 
Eigen::Matrix< double, -1, M > transpose () const
 Return the tranpose of the underlying matrix.
 
Eigen::Matrix< double, 1, -1 > row (size_t index) const
 
auto row (size_t index) -> Eigen::Block< MatrixType, 1, -1, false >
 
Eigen::Matrix< double, M, 1 > col (size_t index) const
 
auto col (size_t index) -> Eigen::Block< MatrixType, M, 1, true >
 
void setZero ()
 
ParameterMatrix< M > operator+ (const ParameterMatrix< M > &other) const
 
ParameterMatrix< M > operator+ (const Eigen::Matrix< double, -1, 1 > &other) const
 
ParameterMatrix< M > operator- (const ParameterMatrix< M > &other) const
 
ParameterMatrix< M > operator- (const Eigen::Matrix< double, -1, 1 > &other) const
 
MatrixType operator* (const Eigen::Matrix< double, -1, -1 > &other) const
 

Vector Space requirements

void print (const std::string &s="") const
 
bool equals (const ParameterMatrix< M > &other, double tol=1e-8) const
 
size_t dim () const
 Returns dimensionality of the tangent space.
 
Vector vector () const
 Convert to vector form, is done row-wise.
 
static ParameterMatrix Identity ()
 

Detailed Description

template<int M>
class gtsam::ParameterMatrix< M >

A matrix abstraction of MxN values at the Basis points. This class serves as a wrapper over an Eigen matrix.

Template Parameters
MThe dimension of the type you wish to evaluate.
Parameters
Nthe number of Basis points (e.g. Chebyshev points of the second kind).

Constructor & Destructor Documentation

◆ ParameterMatrix() [1/2]

template<int M>
gtsam::ParameterMatrix< M >::ParameterMatrix ( const size_t  N)
inline

Create ParameterMatrix using the number of basis points.

Parameters
NThe number of basis points (the columns).

◆ ParameterMatrix() [2/2]

template<int M>
gtsam::ParameterMatrix< M >::ParameterMatrix ( const MatrixType &  matrix)
inline

Create ParameterMatrix from an MxN Eigen Matrix.

Parameters
matrixAn Eigen matrix used to initialze the ParameterMatrix.

Member Function Documentation

◆ col() [1/2]

template<int M>
Eigen::Matrix<double, M, 1> gtsam::ParameterMatrix< M >::col ( size_t  index) const
inline

Get the matrix column specified by index.

Parameters
indexThe column index to retrieve.

◆ col() [2/2]

template<int M>
auto gtsam::ParameterMatrix< M >::col ( size_t  index) -> Eigen::Block<MatrixType, M, 1, true>
inline

Set the matrix column specified by index.

Parameters
indexThe column index to set.

◆ equals()

template<int M>
bool gtsam::ParameterMatrix< M >::equals ( const ParameterMatrix< M > &  other,
double  tol = 1e-8 
) const
inline

Check for equality up to absolute tolerance.

Parameters
otherThe ParameterMatrix to check equality with.
tolThe absolute tolerance threshold.

◆ Identity()

template<int M>
static ParameterMatrix gtsam::ParameterMatrix< M >::Identity ( )
inlinestatic

Identity function to satisfy VectorSpace traits.

NOTE: The size at compile time is unknown so this identity is zero length and thus not valid.

◆ operator*()

template<int M>
MatrixType gtsam::ParameterMatrix< M >::operator* ( const Eigen::Matrix< double, -1, -1 > &  other) const
inline

Multiply ParameterMatrix with an Eigen matrix.

Parameters
otherEigen matrix which should be multiplication compatible with the ParameterMatrix.

◆ operator+() [1/2]

template<int M>
ParameterMatrix<M> gtsam::ParameterMatrix< M >::operator+ ( const ParameterMatrix< M > &  other) const
inline

Add a ParameterMatrix to another.

Parameters
otherParameterMatrix to add.

◆ operator+() [2/2]

template<int M>
ParameterMatrix<M> gtsam::ParameterMatrix< M >::operator+ ( const Eigen::Matrix< double, -1, 1 > &  other) const
inline

Add a MxN-sized vector to the ParameterMatrix.

Parameters
otherVector which is reshaped and added.

◆ operator-() [1/2]

template<int M>
ParameterMatrix<M> gtsam::ParameterMatrix< M >::operator- ( const ParameterMatrix< M > &  other) const
inline

Subtract a ParameterMatrix from another.

Parameters
otherParameterMatrix to subtract.

◆ operator-() [2/2]

template<int M>
ParameterMatrix<M> gtsam::ParameterMatrix< M >::operator- ( const Eigen::Matrix< double, -1, 1 > &  other) const
inline

Subtract a MxN-sized vector from the ParameterMatrix.

Parameters
otherVector which is reshaped and subracted.

◆ print()

template<int M>
void gtsam::ParameterMatrix< M >::print ( const std::string &  s = "") const
inline

Print the ParameterMatrix.

Parameters
sThe prepend string to add more contextual info.

◆ row() [1/2]

template<int M>
Eigen::Matrix<double, 1, -1> gtsam::ParameterMatrix< M >::row ( size_t  index) const
inline

Get the matrix row specified by index.

Parameters
indexThe row index to retrieve.

◆ row() [2/2]

template<int M>
auto gtsam::ParameterMatrix< M >::row ( size_t  index) -> Eigen::Block<MatrixType, 1, -1, false>
inline

Set the matrix row specified by index.

Parameters
indexThe row index to set.

◆ setZero()

template<int M>
void gtsam::ParameterMatrix< M >::setZero ( )
inline

Set all matrix coefficients to zero.


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