From fdb4138d109790270b081d56b80bc13d4f731a98 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Sun, 1 Apr 2012 20:22:24 +0000 Subject: [PATCH] Started NLO state --- .project | 2 +- gtsam/nonlinear/NonlinearOptimizer.h | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.project b/.project index f59d79cb7..9856df2ea 100644 --- a/.project +++ b/.project @@ -23,7 +23,7 @@ org.eclipse.cdt.make.core.buildArguments - -j7 + -j5 org.eclipse.cdt.make.core.buildCommand diff --git a/gtsam/nonlinear/NonlinearOptimizer.h b/gtsam/nonlinear/NonlinearOptimizer.h index 89982c17c..361b1bd69 100644 --- a/gtsam/nonlinear/NonlinearOptimizer.h +++ b/gtsam/nonlinear/NonlinearOptimizer.h @@ -59,6 +59,27 @@ public: }; +/** + * Base class for a nonlinear optimization state, including the current estimate + * of the variable values, error, and number of iterations. Optimizers derived + * from NonlinearOptimizer usually also define a derived state class containing + * additional state specific to the algorithm (for example, Dogleg state + * contains the current trust region radius). + */ +class NonlinearOptimizerState { +public: + + /** The current estimate of the variable values. */ + Values values; + + /** The factor graph error on the current values. */ + double error; + + /** The number of optimization iterations performed. */ + unsigned int iterations; +}; + + /** * This is the abstract interface for classes that can optimize for the * maximum-likelihood estimate of a NonlinearFactorGraph.