diff --git a/cpp/NonlinearFactor.h b/cpp/NonlinearFactor.h index 7734e4dcf..b98aeb419 100644 --- a/cpp/NonlinearFactor.h +++ b/cpp/NonlinearFactor.h @@ -85,6 +85,12 @@ namespace gtsam { return keys_; } + /* return the begin iterator of keys */ + std::list::const_iterator begin() const { return keys_.begin(); } + + /* return the end iterator of keys */ + std::list::const_iterator end() const { return keys_.end(); } + /** access to the noise model */ SharedGaussian get_noiseModel() const { return noiseModel_;