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.
parent
193e068cee
commit
859bd16fd5
|
|
@ -140,7 +140,7 @@ namespace gtsam {
|
||||||
// TODO: in theory we can't infinitely recurse, but maybe we should put a max.
|
// 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>
|
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_ ;
|
const Parameters::verbosityLevel verbosity = parameters_->verbosity_ ;
|
||||||
double lambda = parameters_->lambda_ ;
|
double lambda = parameters_->lambda_ ;
|
||||||
|
|
|
||||||
|
|
@ -107,11 +107,6 @@ namespace gtsam {
|
||||||
// The dimensions of each linearized variable
|
// The dimensions of each linearized variable
|
||||||
const shared_dimensions dimensions_;
|
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
|
* Constructor that does not do any computation
|
||||||
*/
|
*/
|
||||||
|
|
@ -250,6 +245,9 @@ namespace gtsam {
|
||||||
// suggested interface
|
// suggested interface
|
||||||
NonlinearOptimizer gaussNewton() const;
|
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
|
* One iteration of Levenberg Marquardt
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue