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