Loading...
Searching...
No Matches
gtsam::ParameterMatrix< M > Class Template Reference

## 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

  M | The dimension of the type you wish to evaluate.

Parameters

  N | the number of Basis points (e.g. Chebyshev points of the second kind).

## Vector Space requirements

void | print (const std::string &s="") const
| Print the ParameterMatrix.
bool | equals (const ParameterMatrix< M > &other, double tol=1e-8) const
| Check for equality up to absolute tolerance.
size_t | dim () const
| Returns dimensionality of the tangent space.
Vector | vector () const
| Convert to vector form, is done row-wise.
static ParameterMatrix | Identity ()
| Identity function to satisfy VectorSpace traits.

## Public Member Functions

| ParameterMatrix (const size_t N)
| Create ParameterMatrix using the number of basis points.
| ParameterMatrix (const MatrixType &matrix)
| Create ParameterMatrix from an MxN Eigen 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
| Get the matrix row specified by index.
auto | row (size_t index) -> Eigen::Block< MatrixType, 1, -1, false >
| Set the matrix row specified by index.
Eigen::Matrix< double, M, 1 > | col (size_t index) const
| Get the matrix column specified by index.
auto | col (size_t index) -> Eigen::Block< MatrixType, M, 1, true >
| Set the matrix column specified by index.
void | setZero ()
| Set all matrix coefficients to zero.
ParameterMatrix< M > | operator+ (const ParameterMatrix< M > &other) const
| Add a ParameterMatrix to another.
ParameterMatrix< M > | operator+ (const Eigen::Matrix< double, -1, 1 > &other) const
| Add a MxN-sized vector to the ParameterMatrix.
ParameterMatrix< M > | operator- (const ParameterMatrix< M > &other) const
| Subtract a ParameterMatrix from another.
ParameterMatrix< M > | operator- (const Eigen::Matrix< double, -1, 1 > &other) const
| Subtract a MxN-sized vector from the ParameterMatrix.
MatrixType | operator* (const Eigen::Matrix< double, -1, -1 > &other) const
| Multiply ParameterMatrix with an Eigen matrix.

## Public Types

enum | { dimension = Eigen::Dynamic }

## 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

  N | The 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

  matrix | An Eigen matrix used to initialze the ParameterMatrix.

## Member Function Documentation

## col() [1/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

  index | The column index to set.

## col() [2/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

  index | The column index to retrieve.

## 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

  other | The ParameterMatrix to check equality with.
  tol | The absolute tolerance threshold.

## Identity()

template<int M>

ParameterMatrix gtsam::ParameterMatrix< M >::Identity | ( |  | ) |

inline static

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

  other | Eigen matrix which should be multiplication compatible with the ParameterMatrix.

## operator+() [1/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

  other | Vector which is reshaped and added.

## operator+() [2/2]

template<int M>

ParameterMatrix< M > gtsam::ParameterMatrix< M >::operator+ | ( | const ParameterMatrix< M > & | other | ) | const

inline

Add a ParameterMatrix to another.

Parameters

  other | ParameterMatrix to add.

## operator-() [1/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

  other | Vector which is reshaped and subracted.

## operator-() [2/2]

template<int M>

ParameterMatrix< M > gtsam::ParameterMatrix< M >::operator- | ( | const ParameterMatrix< M > & | other | ) | const

inline

Subtract a ParameterMatrix from another.

Parameters

  other | ParameterMatrix to subtract.

## print()

template<int M>

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

inline

Print the ParameterMatrix.

Parameters

  s | The prepend string to add more contextual info.

## row() [1/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

  index | The row index to set.

## row() [2/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

  index | The row index to retrieve.

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

- /build/gtsam-Xg031d/gtsam-4.2.0+dfsg/gtsam/basis/ParameterMatrix.h