61 void print(
const std::string& str =
"Marginals: ",
const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const;
68 Matrix marginalInformation(
Key variable)
const;
71 Matrix marginalCovariance(
Key variable)
const;
74 JointMarginal jointMarginalCovariance(
const std::vector<Key>& variables)
const;
77 JointMarginal jointMarginalInformation(
const std::vector<Key>& variables)
const;
108 const auto indexI = indices_.at(iVariable);
109 const auto indexJ = indices_.at(jVariable);
110 return blockMatrix_.
block(indexI, indexJ);
115 return (*
this)(iVariable, jVariable);
124 void print(
const std::string& s =
"",
const KeyFormatter& formatter = DefaultKeyFormatter)
const;
127 JointMarginal(
const Matrix& fullMatrix,
const std::vector<size_t>& dims,
const std::vector<Key>& keys) :
128 blockMatrix_(dims, fullMatrix), keys_(keys), indices_(
Ordering(keys).invert()) {}
A non-templated config holding any types of Manifold-group elements.
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianFactor.h:42
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:140
Matrix fullMatrix() const
The full, dense covariance/information matrix of the joint marginal.
Definition: Marginals.h:119
Matrix operator()(Key iVariable, Key jVariable) const
Access a block, corresponding to a pair of variables, of the joint marginal.
Definition: Marginals.h:107
Gaussian Bayes Tree, the result of eliminating a GaussianJunctionTree.
A non-templated config holding any types of Manifold-group elements.
Definition: Values.h:70
Definition: SymmetricBlockMatrix.h:51
A class to store and access a joint marginal, returned from Marginals::jointMarginalCovariance and Ma...
Definition: Marginals.h:86
EliminateableFactorGraph is a base class for factor graphs that contains elimination algorithms...
Definition: EliminateableFactorGraph.h:56
Factorization
The linear factorization mode - either CHOLESKY (faster and suitable for most problems) or QR (slower...
Definition: Marginals.h:37
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:90
Definition: Ordering.h:33
Matrix at(Key iVariable, Key jVariable) const
Synonym for operator()
Definition: Marginals.h:114
Point3 optimize(const NonlinearFactorGraph &graph, const Values &values, Key landmarkKey)
Optimize for triangulation.
Definition: triangulation.cpp:73
A non-linear factor graph is a graph of non-Gaussian, i.e.
Definition: NonlinearFactorGraph.h:77
A Bayes tree representing a Gaussian density.
Definition: GaussianBayesTree.h:49
Factor Graph Constsiting of non-linear factors.
Eigen::SelfAdjointView< constBlock, Eigen::Upper > selfadjointView(DenseIndex I, DenseIndex J) const
Return the square sub-matrix that contains blocks(i:j, i:j).
Definition: SymmetricBlockMatrix.h:161
A Linear Factor Graph is a factor graph where all factors are Gaussian, i.e.
Definition: GaussianFactorGraph.h:65
Matrix block(DenseIndex I, DenseIndex J) const
Get a copy of a block (anywhere in the matrix).
Definition: SymmetricBlockMatrix.cpp:54
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:57
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33
A class for computing Gaussian marginals of variables in a NonlinearFactorGraph.
Definition: Marginals.h:32