|
gtsam
3.2.1
gtsam
|
A class to store and access a joint marginal, returned from Marginals::jointMarginalCovariance and Marginals::jointMarginalInformation.
Public Member Functions | |
| Block | operator() (Key iVariable, Key jVariable) const |
| Access a block, corresponding to a pair of variables, of the joint marginal. More... | |
| Block | at (Key iVariable, Key jVariable) const |
| Synonym for operator() | |
| Eigen::SelfAdjointView< const Matrix, Eigen::Upper > | fullMatrix () const |
| The full, dense covariance/information matrix of the joint marginal. More... | |
| void | print (const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const |
| Print. | |
Public Types | |
|
typedef SymmetricBlockMatrix::constBlock | Block |
| A block view of the joint marginal - this stores a reference to the JointMarginal object, so the JointMarginal object must be kept in scope while this block view is needed, otherwise assign this block object to a Matrix to store it. | |
Protected Member Functions | |
| JointMarginal (const Matrix &fullMatrix, const std::vector< size_t > &dims, const std::vector< Key > &keys) | |
Protected Attributes | |
| SymmetricBlockMatrix | blockMatrix_ |
| std::vector< size_t > | keys_ |
| FastMap< Key, size_t > | indices_ |
Friends | |
| class | Marginals |
|
inline |
The full, dense covariance/information matrix of the joint marginal.
This returns a reference to the JointMarginal object, so the JointMarginal object must be kept in scope while this view is needed. Otherwise assign this block object to a Matrix to store it.
Access a block, corresponding to a pair of variables, of the joint marginal.
Each block is accessed by its "vertical position", corresponding to the variable with nonlinear Key iVariable and "horizontal position", corresponding to the variable with nonlinear Key jVariable.
For example, if we have the joint marginal on a 2D pose "x3" and a 2D landmark "l2", then jointMarginal(Symbol('x',3), Symbol('l',2)) will return the 3x2 block of the joint covariance matrix corresponding to x3 and l2.
| iVariable | The nonlinear Key specifying the "vertical position" of the requested block |
| jVariable | The nonlinear Key specifying the "horizontal position" of the requested block |