From f7a16654766386522ee2237c0a46a9485fab9137 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 3 Jan 2011 21:02:21 +0000 Subject: [PATCH] Added a non-const noiseModel accessor to GaussianFactor --- gtsam/linear/GaussianFactor.h | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gtsam/linear/GaussianFactor.h b/gtsam/linear/GaussianFactor.h index b43434a94..fd9d154a4 100644 --- a/gtsam/linear/GaussianFactor.h +++ b/gtsam/linear/GaussianFactor.h @@ -191,11 +191,14 @@ namespace gtsam { public: - /** get a copy of sigmas */ - const Vector& get_sigmas() const { return model_->sigmas(); } + /** access the sigmas */ + const Vector& get_sigmas() const { return model_->sigmas(); } - /** get a copy of model */ - const SharedDiagonal& get_model() const { return model_; } + /** access the noise model */ + const SharedDiagonal& get_model() const { return model_; } + + /** access the noise model (non-const version) */ + SharedDiagonal& get_model() { return model_; } /** get the indices list */ const std::vector& get_firstNonzeroBlocks() const { return firstNonzeroBlocks_; }