Merged in fix/416_iterate (pull request #428)

close issue #416
Add return argument for iterate
release/4.3a0
Frank Dellaert 2019-05-17 04:37:52 +00:00
commit 340fe9afc8
7 changed files with 26 additions and 17 deletions

View File

@ -2140,7 +2140,7 @@ virtual class NonlinearOptimizer {
double error() const;
int iterations() const;
gtsam::Values values() const;
void iterate() const;
gtsam::GaussianFactorGraph* iterate() const;
};
#include <gtsam/nonlinear/GaussNewtonOptimizer.h>

View File

@ -105,9 +105,9 @@ public:
/** Virtual destructor */
virtual ~DoglegOptimizer() {}
/** Perform a single iteration, returning a new NonlinearOptimizer class
* containing the updated variable assignments, which may be retrieved with
* values().
/**
* Perform a single iteration, returning GaussianFactorGraph corresponding to
* the linearized factor graph.
*/
GaussianFactorGraph::shared_ptr iterate() override;

View File

@ -70,9 +70,9 @@ public:
/** Virtual destructor */
virtual ~GaussNewtonOptimizer() {}
/** Perform a single iteration, returning a new NonlinearOptimizer class
* containing the updated variable assignments, which may be retrieved with
* values().
/**
* Perform a single iteration, returning GaussianFactorGraph corresponding to
* the linearized factor graph.
*/
GaussianFactorGraph::shared_ptr iterate() override;

View File

@ -94,9 +94,9 @@ public:
/// @name Advanced interface
/// @{
/** Perform a single iteration, returning a new NonlinearOptimizer class
* containing the updated variable assignments, which may be retrieved with
* values().
/**
* Perform a single iteration, returning GaussianFactorGraph corresponding to
* the linearized factor graph.
*/
GaussianFactorGraph::shared_ptr iterate() override;

View File

@ -70,7 +70,16 @@ public:
virtual ~NonlinearConjugateGradientOptimizer() {
}
/**
* Perform a single iteration, returning GaussianFactorGraph corresponding to
* the linearized factor graph.
*/
GaussianFactorGraph::shared_ptr iterate() override;
/**
* Optimize for the maximum-likelihood estimate, returning a the optimized
* variable assignments.
*/
const Values& optimize() override;
};

View File

@ -86,9 +86,9 @@ public:
/// @name Standard interface
/// @{
/** Optimize for the maximum-likelihood estimate, returning a new
* NonlinearOptimizer class containing the optimized variable assignments,
* which may be retrieved with values().
/**
* Optimize for the maximum-likelihood estimate, returning a the optimized
* variable assignments.
*
* This function simply calls iterate() in a loop, checking for convergence
* with check_convergence(). For fine-grain control over the optimization
@ -126,9 +126,9 @@ public:
virtual VectorValues solve(const GaussianFactorGraph &gfg,
const NonlinearOptimizerParams& params) const;
/** Perform a single iteration, returning a new NonlinearOptimizer class
* containing the updated variable assignments, which may be retrieved with
* values().
/**
* Perform a single iteration, returning GaussianFactorGraph corresponding to
* the linearized factor graph.
*/
virtual GaussianFactorGraph::shared_ptr iterate() = 0;

View File

@ -2045,7 +2045,7 @@ virtual class NonlinearOptimizer {
double error() const;
int iterations() const;
gtsam::Values values() const;
void iterate() const;
gtsam::GaussianFactorGraph* iterate() const;
};
virtual class GaussNewtonOptimizer : gtsam::NonlinearOptimizer {