|
gtsam
|
Multifrontal solver for nonlinear factor graphs.
This class extends MultifrontalSolver to solve nonlinear problems. The linearization is provided externally via load(), or via eliminateInPlace() which combines loading and elimination.
Public Member Functions | |
| NonlinearMultifrontalSolver (const NonlinearFactorGraph &graph, const Values &values, const Ordering &ordering, MultifrontalSolver::Parameters params={}, DampingParams dampingParams=DampingParams()) | |
| Construct the solver from a nonlinear factor graph and linearization point. | |
| void | load (const GaussianFactorGraph &graph) |
| Load new numerical values from the factor graph. | |
| void | eliminateInPlace (double lambda=0.0) |
| Eliminate with optional LM-style damping. | |
| void | eliminateInPlace (const GaussianFactorGraph &graph, double lambda=0.0) |
| Load and eliminate the graph in a single traversal with optional damping. | |
| Public Member Functions inherited from gtsam::MultifrontalSolver | |
| MultifrontalSolver (const GaussianFactorGraph &graph, const Ordering &ordering, const Parameters ¶ms=Parameters{}) | |
| Construct the solver from a factor graph and an ordering. | |
| MultifrontalSolver (const GaussianFactorGraph &graph, const Ordering &ordering, size_t firstPhaseSize, const Parameters ¶ms=Parameters{}) | |
| Construct a solver configured for partial multifrontal elimination. | |
| MultifrontalSolver (PrecomputedData data, const Ordering &ordering, const Parameters ¶ms=Parameters{}) | |
| Construct the solver from precomputed symbolic data. | |
| MultifrontalSolver (PrecomputedData data, const Ordering &ordering, size_t firstPhaseSize, const Parameters ¶ms=Parameters{}) | |
| Construct a partial solver from precomputed symbolic data. | |
| void | load (const GaussianFactorGraph &graph) |
| Load new numerical values from the factor graph. | |
| void | eliminateInPlace () |
| Eliminate the graph using Cholesky factorization. | |
| void | eliminateInPlace (const GaussianFactorGraph &graph) |
| Load and eliminate the graph in a single traversal. | |
| void | eliminatePartialInPlace () |
| Eliminate the configured ordering prefix and assemble the retained clique factors without factorizing the retained variables. | |
| void | eliminatePartialInPlace (const GaussianFactorGraph &graph) |
| Load a graph and partially eliminate it in one bottom-up traversal. | |
| GaussianFactorGraph | remainingFactorGraph () const |
| Materialize one Hessian factor per retained clique after partial elimination. | |
| GaussianBayesTree | computeBayesTree () const |
| Compute a Bayes tree from the in-place Cholesky factorization. | |
| const VectorValues & | updateSolution () |
| Solve for the update vector. | |
| const VectorValues & | updateSolution (const VectorValues &retainedSolution) |
| Seed retained variables and back-substitute through eliminated cliques. | |
| double | deltaError (double *oldError=nullptr, double *newError=nullptr) const |
| Return the linearized delta error from the last updateSolution() call. | |
| const std::vector< CliquePtr > & | roots () const |
| Accessor for the roots of the elimination tree. | |
| size_t | cliqueCount () const |
| Get the total number of cliques in the solver. | |
| void | print (const std::string &s="", const KeyFormatter &keyFormatter=DefaultKeyFormatter) const |
| Print the solver state. | |
| Public Member Functions inherited from gtsam::ForestTraversal< MultifrontalSolver, MultifrontalClique > | |
| ForestTraversal (size_t numThreads=std::thread::hardware_concurrency()) | |
| Construct a helper with a fixed thread budget (used by TBB when enabled). | |
| void | runTopDown (Fn fn, int parallelThreshold=10) |
| Scheduler-based top-down traversal. | |
| void | runBottomUp (Fn fn, int parallelThreshold=10, size_t leafAggregationProblemSize=0) |
| Scheduler-based bottom-up traversal. | |
Static Public Member Functions | |
| static MultifrontalSolver::PrecomputedData | Precompute (const NonlinearFactorGraph &graph, const Values &values, const Ordering &ordering) |
| Precompute symbolic structure from a nonlinear factor graph and values. | |
| Static Public Member Functions inherited from gtsam::MultifrontalSolver | |
| static PrecomputedData | Precompute (const GaussianFactorGraph &graph, const Ordering &ordering) |
| Precompute symbolic structure and sizing data from a factor graph. | |
Public Types | |
| using | DampingParams = LMDampingParams |
| Public Types inherited from gtsam::MultifrontalSolver | |
| using | Parameters = MultifrontalParameters |
| Tuning parameters for traversal and reporting. | |
| using | CliquePtr = std::shared_ptr<MultifrontalClique> |
| Shared pointer to a MultifrontalClique. | |
| using | Node = MultifrontalClique |
| Node type for tree traversal utilities. | |
Additional Inherited Members | |
| Protected Attributes inherited from gtsam::MultifrontalSolver | |
| std::vector< CliquePtr > | roots_ |
| Roots of the elimination tree. | |
| std::vector< CliquePtr > | cliques_ |
| All cliques in the solver. | |
| std::map< Key, size_t > | dims_ |
| Map from variable key to dimension. | |
| VectorValues | solution_ |
| Cached solution vector. | |
| std::unordered_set< Key > | fixedKeys_ |
| Keys fixed by constrained factors. | |
| bool | loaded_ = false |
| Whether load() has been called. | |
| bool | eliminated_ = false |
| Whether eliminateInPlace() ran. | |
| bool | partiallyEliminated_ = false |
| Whether partial elimination ran. | |
| Ordering | ordering_ |
| Complete variable ordering. | |
| size_t | firstPhaseSize_ = 0 |
| Prefix eliminated in partial mode. | |
| Parameters | params_ |
| Tunable solver parameters. | |
| double | lastOldError_ = 0.0 |
| Cached old linearized error. | |
| double | lastNewError_ = 0.0 |
| Cached new linearized error. | |
| bool | hasDeltaError_ = false |
| Whether updateSolution computed it. | |
| gtsam::NonlinearMultifrontalSolver::NonlinearMultifrontalSolver | ( | const NonlinearFactorGraph & | graph, |
| const Values & | values, | ||
| const Ordering & | ordering, | ||
| MultifrontalSolver::Parameters | params = {}, | ||
| DampingParams | dampingParams = DampingParams() ) |
Construct the solver from a nonlinear factor graph and linearization point.
This computes the symbolic structure (including fixed keys) from the nonlinear graph and uses the values to determine variable dimensions. Call load() with a linearized graph before eliminating.
| graph | The nonlinear factor graph to build structure from. |
| values | The linearization point used to determine variable dims. |
| ordering | The variable ordering to use. |
| params | Tunable parameters for traversal and reporting. |
| void gtsam::NonlinearMultifrontalSolver::eliminateInPlace | ( | const GaussianFactorGraph & | graph, |
| double | lambda = 0.0 ) |
Load and eliminate the graph in a single traversal with optional damping.
This calls fillAb() and factorization per clique in post-order.
| graph | The linearized factor graph (structure must match). |
| lambda | Optional damping value; non-positive disables damping. |
| void gtsam::NonlinearMultifrontalSolver::eliminateInPlace | ( | double | lambda = 0.0 | ) |
Eliminate with optional LM-style damping.
When lambda is provided, adds damping on frontal blocks before factorization.
| void gtsam::NonlinearMultifrontalSolver::load | ( | const GaussianFactorGraph & | graph | ) |
Load new numerical values from the factor graph.
This overrides the base load() to optionally cache diag(J^T J) for exact diagonal damping when enabled.
|
static |
Precompute symbolic structure from a nonlinear factor graph and values.
This avoids linearization; call load() with a linearized graph before eliminating.