fixed constness bug in NonlinearISAM marginals
parent
61d3d30f3b
commit
be6bec2630
|
@ -85,7 +85,7 @@ void NonlinearISAM<Values>::reorder_relinearize() {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class Values>
|
template<class Values>
|
||||||
Values NonlinearISAM<Values>::estimate() {
|
Values NonlinearISAM<Values>::estimate() const {
|
||||||
if(isam_.size() > 0)
|
if(isam_.size() > 0)
|
||||||
return linPoint_.expmap(optimize(isam_), ordering_);
|
return linPoint_.expmap(optimize(isam_), ordering_);
|
||||||
else
|
else
|
||||||
|
@ -94,7 +94,7 @@ Values NonlinearISAM<Values>::estimate() {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class Values>
|
template<class Values>
|
||||||
Matrix NonlinearISAM<Values>::marginalCovariance(const Symbol& key) {
|
Matrix NonlinearISAM<Values>::marginalCovariance(const Symbol& key) const {
|
||||||
Matrix covariance; Vector mean;
|
Matrix covariance; Vector mean;
|
||||||
boost::tie(mean, covariance) = isam_.marginal(ordering_[key]);
|
boost::tie(mean, covariance) = isam_.marginal(ordering_[key]);
|
||||||
return covariance;
|
return covariance;
|
||||||
|
|
|
@ -66,7 +66,7 @@ public:
|
||||||
void update(const Factors& newFactors, const Values& initialValues);
|
void update(const Factors& newFactors, const Values& initialValues);
|
||||||
|
|
||||||
/** Return the current solution estimate */
|
/** Return the current solution estimate */
|
||||||
Values estimate();
|
Values estimate() const;
|
||||||
|
|
||||||
/** Relinearization and reordering of variables */
|
/** Relinearization and reordering of variables */
|
||||||
void reorder_relinearize();
|
void reorder_relinearize();
|
||||||
|
@ -78,7 +78,7 @@ public:
|
||||||
void setOrdering(const Ordering& new_ordering) { ordering_ = new_ordering; }
|
void setOrdering(const Ordering& new_ordering) { ordering_ = new_ordering; }
|
||||||
|
|
||||||
/** find the marginal covariance for a single variable */
|
/** find the marginal covariance for a single variable */
|
||||||
Matrix marginalCovariance(const Symbol& key);
|
Matrix marginalCovariance(const Symbol& key) const;
|
||||||
|
|
||||||
// access
|
// access
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue