Allow graph to be queried

release/4.3a0
Frank Dellaert 2020-08-01 15:40:50 -04:00
parent 8a3be052fe
commit 94f744ecae
2 changed files with 8 additions and 4 deletions

View File

@ -2369,6 +2369,7 @@ virtual class NonlinearOptimizer {
double error() const;
int iterations() const;
gtsam::Values values() const;
gtsam::NonlinearFactorGraph graph() const;
gtsam::GaussianFactorGraph* iterate() const;
};

View File

@ -105,15 +105,18 @@ public:
*/
const Values& optimizeSafely();
/// return error
/// return error in current optimizer state
double error() const;
/// return number of iterations
/// return number of iterations in current optimizer state
size_t iterations() const;
/// return values
/// return values in current optimizer state
const Values &values() const;
/// return the graph with nonlinear factors
const NonlinearFactorGraph &graph() const { return graph_; }
/// @}
/// @name Advanced interface