Added a marginalCovariance function directly to NonlinearISAM
parent
d8f05f78ff
commit
61d3d30f3b
|
@ -91,3 +91,11 @@ Values NonlinearISAM<Values>::estimate() {
|
|||
else
|
||||
return linPoint_;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class Values>
|
||||
Matrix NonlinearISAM<Values>::marginalCovariance(const Symbol& key) {
|
||||
Matrix covariance; Vector mean;
|
||||
boost::tie(mean, covariance) = isam_.marginal(ordering_[key]);
|
||||
return covariance;
|
||||
}
|
||||
|
|
|
@ -77,6 +77,9 @@ public:
|
|||
/** replace the current ordering */
|
||||
void setOrdering(const Ordering& new_ordering) { ordering_ = new_ordering; }
|
||||
|
||||
/** find the marginal covariance for a single variable */
|
||||
Matrix marginalCovariance(const Symbol& key);
|
||||
|
||||
// access
|
||||
|
||||
/** access the underlying bayes tree */
|
||||
|
|
Loading…
Reference in New Issue