CPU SFM optimizer supporting either a joint solve or Schur elimination of Point3 and Unit3 variables.
MULTIFRONTAL_SOLVER performs Schur elimination in one fused factorization; other solvers receive an explicitly reduced graph containing every other variable type.
|
|
| SfmLevenbergMarquardtOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const SfmLevenbergMarquardtParams ¶ms=SfmLevenbergMarquardtParams()) |
|
const SfmLevenbergMarquardtParams & | sfmParams () const |
| | LevenbergMarquardtOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const LevenbergMarquardtParams ¶ms=LevenbergMarquardtParams()) |
| | Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters.
|
| | LevenbergMarquardtOptimizer (const NonlinearFactorGraph &graph, const Values &initialValues, const Ordering &ordering, const LevenbergMarquardtParams ¶ms=LevenbergMarquardtParams()) |
| | Standard constructor, requires a nonlinear factor graph, initial variable assignments, and optimization parameters.
|
|
| ~LevenbergMarquardtOptimizer () override |
| | Virtual destructor.
|
|
double | lambda () const |
| | Access the current damping value.
|
|
int | getInnerIterations () const |
| | Access the current number of inner iterations.
|
|
void | print (const std::string &str="") const |
| | print
|
| GaussianFactorGraph::shared_ptr | iterate () override |
| | Perform a single iteration, returning GaussianFactorGraph corresponding to the linearized factor graph.
|
|
const LevenbergMarquardtParams & | params () const |
| | Read-only access the parameters.
|
|
void | writeLogFile (double currentError) |
|
virtual GaussianFactorGraph::shared_ptr | linearize () const |
| | linearize, can be overwritten
|
|
virtual GaussianFactorGraph | buildDampedSystem (const GaussianFactorGraph &linear, const VectorValues &sqrtHessianDiagonal) const |
| | Build the damped linear system for the current lambda.
|
|
bool | tryLambda (const GaussianFactorGraph &linear, const VectorValues &sqrtHessianDiagonal) |
| | Inner loop, changes state, returns true if successful or giving up.
|
| virtual const Values & | optimize () |
| | Optimize for the maximum-likelihood estimate, returning a the optimized variable assignments.
|
| const Values & | optimizeSafely () |
| | Optimize, but return empty result if any uncaught exception is thrown Intended for MATLAB.
|
|
double | error () const |
| | return error in current optimizer state
|
|
size_t | iterations () const |
| | return number of iterations in current optimizer state
|
|
const Values & | values () const |
| | return values in current optimizer state
|
|
const NonlinearFactorGraph & | graph () const |
| | return the graph with nonlinear factors
|
|
virtual | ~NonlinearOptimizer () |
| | Virtual destructor.
|
|
|
typedef std::shared_ptr< LevenbergMarquardtOptimizer > | shared_ptr |
|
using | shared_ptr = std::shared_ptr<const NonlinearOptimizer> |
| | A shared pointer to this class.
|
|
const LevenbergMarquardtParams | params_ |
| | LM parameters.
|
|
std::chrono::time_point< std::chrono::high_resolution_clock > | startTime_ |
| | time when optimization started
|
|
std::chrono::time_point< std::chrono::high_resolution_clock > | iterationStart_ |
|
double | lastLinearizeTime_ {0.0} |
|
double | lastSolveTime_ {0.0} |
|
std::shared_ptr< const NonlinearFactorGraph > | graph_ |
| | The graph with nonlinear factors.
|
|
std::unique_ptr< internal::NonlinearOptimizerState > | state_ |
| | PIMPL'd state.
|
|
std::unique_ptr< NonlinearMultifrontalSolver > | nonlinearMultifrontalSolver_ |
| | Solver for multifrontal Cholesky, lazily created.
|
|
std::unique_ptr< internal::CholmodSolver > | cholmodSolver_ |
| | Optional reusable CHOLMOD numerical and symbolic session.
|
Ensure that the nonlinearMultifrontalSolver_ is populated if (and only if) the params request the multifrontal Cholesky solver type (e.g., MULTIFRONTAL_SOLVER).
Returns true if the multifrontal solver is available and ready. If a different solver type is requested in params, this function returns false without modifying any solver state. If constraints are present or multifrontal initialization fails, it also returns false (and callers should fall back to the legacy linear solver path).
Reimplemented from gtsam::NonlinearOptimizer.