Added dense matrix accessor for JointMarginals
parent
44a3ec1e1d
commit
355141f985
1
gtsam.h
1
gtsam.h
|
|
@ -1239,6 +1239,7 @@ class Marginals {
|
||||||
|
|
||||||
class JointMarginal {
|
class JointMarginal {
|
||||||
Matrix at(size_t iVariable, size_t jVariable) const;
|
Matrix at(size_t iVariable, size_t jVariable) const;
|
||||||
|
Matrix fullMatrix() const;
|
||||||
void print(string s) const;
|
void print(string s) const;
|
||||||
void print() const;
|
void print() const;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -116,6 +116,13 @@ public:
|
||||||
Block at(Key iVariable, Key jVariable) const {
|
Block at(Key iVariable, Key jVariable) const {
|
||||||
return (*this)(iVariable, jVariable); }
|
return (*this)(iVariable, jVariable); }
|
||||||
|
|
||||||
|
/** 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.
|
||||||
|
*/
|
||||||
|
const Matrix& fullMatrix() const { return fullMatrix_; }
|
||||||
|
|
||||||
/** Copy constructor */
|
/** Copy constructor */
|
||||||
JointMarginal(const JointMarginal& other);
|
JointMarginal(const JointMarginal& other);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue