Made NonlinearOptimizer::try_lambda public to allow the linear system to be modified at every LM iteration, this needs to be done somehow to implement Gaussian mixture EM, but this isn't an ideal solution. Also added a missing 'const' to the linear graph argument.

release/4.3a0
Richard Roberts 2011-01-02 04:57:48 +00:00
parent 193e068cee
commit 859bd16fd5
2 changed files with 4 additions and 6 deletions

View File

@ -140,7 +140,7 @@ namespace gtsam {
// TODO: in theory we can't infinitely recurse, but maybe we should put a max.
/* ************************************************************************* */
template<class G, class C, class L, class S, class W>
NonlinearOptimizer<G, C, L, S, W> NonlinearOptimizer<G, C, L, S, W>::try_lambda(L& linear) {
NonlinearOptimizer<G, C, L, S, W> NonlinearOptimizer<G, C, L, S, W>::try_lambda(const L& linear) {
const Parameters::verbosityLevel verbosity = parameters_->verbosity_ ;
double lambda = parameters_->lambda_ ;

View File

@ -107,11 +107,6 @@ namespace gtsam {
// The dimensions of each linearized variable
const shared_dimensions dimensions_;
// Recursively try to do tempered Gauss-Newton steps until we succeed
// NonlinearOptimizer try_lambda(const L& linear,
// Parameters::verbosityLevel verbosity, double factor, Parameters::LambdaMode lambdaMode) const;
NonlinearOptimizer try_lambda(L& linear);
/**
* Constructor that does not do any computation
*/
@ -250,6 +245,9 @@ namespace gtsam {
// suggested interface
NonlinearOptimizer gaussNewton() const;
/** Recursively try to do tempered Gauss-Newton steps until we succeed */
NonlinearOptimizer try_lambda(const L& linear);
/**
* One iteration of Levenberg Marquardt
*/