gtsam
Loading...
Searching...
No Matches
gtsam::PCGSolver Class Reference

Detailed Description

A virtual base class for the preconditioned conjugate gradient solver.

Inheritance diagram for gtsam::PCGSolver:

Public Member Functions

 PCGSolver (const PCGSolverParameters &p)
 Construct a solver with the supplied iteration and preconditioner settings.
VectorValues optimize (const GaussianFactorGraph &gfg, const KeyInfo &keyInfo, const std::map< Key, Vector > &lambda, const VectorValues &initial) override
 Solve using explicit key metadata, damping, and an initial estimate.
PCGSolverResult optimizeDetailed (const GaussianFactorGraph &gfg, bool collectResidualHistory=true)
 Optimize from zero and return convergence diagnostics and phase timings.
PCGSolverResult optimizeDetailed (const GaussianFactorGraph &gfg, const KeyInfo &keyInfo, const std::map< Key, Vector > &lambda, const VectorValues &initial, bool collectResidualHistory=true)
 Optimize with explicit metadata and an initial estimate, returning convergence diagnostics and phase timings.
GTSAM_EXPORT VectorValues optimize (const GaussianFactorGraph &gfg, const KeyInfo *=nullptr, const std::map< Key, Vector > *lambda=nullptr)
GTSAM_EXPORT VectorValues optimize (const GaussianFactorGraph &gfg, const KeyInfo &keyInfo, const std::map< Key, Vector > &lambda)
Public Member Functions inherited from gtsam::IterativeSolver
GTSAM_EXPORT VectorValues optimize (const GaussianFactorGraph &gfg, const KeyInfo *=nullptr, const std::map< Key, Vector > *lambda=nullptr)
GTSAM_EXPORT VectorValues optimize (const GaussianFactorGraph &gfg, const KeyInfo &keyInfo, const std::map< Key, Vector > &lambda)

Public Types

typedef IterativeSolver Base
typedef std::shared_ptr< PCGSolver > shared_ptr
Public Types inherited from gtsam::IterativeSolver
typedef std::shared_ptr< IterativeSolver > shared_ptr

Protected Attributes

PCGSolverParameters parameters_
std::shared_ptr< Preconditioner > preconditioner_

Constructor & Destructor Documentation

◆ PCGSolver()

gtsam::PCGSolver::PCGSolver ( const PCGSolverParameters & p)

Construct a solver with the supplied iteration and preconditioner settings.

Parameters
pSettings copied into the solver.

Member Function Documentation

◆ optimize()

VectorValues gtsam::PCGSolver::optimize ( const GaussianFactorGraph & gfg,
const KeyInfo & keyInfo,
const std::map< Key, Vector > & lambda,
const VectorValues & initial )
overridevirtual

Solve using explicit key metadata, damping, and an initial estimate.

Parameters
gfgGaussian factor graph defining the normal equations.
keyInfoOrdering, dimensions, and scalar offsets for graph keys.
lambdaPer-key damping forwarded to the preconditioner.
initialInitial estimate in keyed form.
Returns
Final solution in keyed form.

Implements gtsam::IterativeSolver.

◆ optimizeDetailed() [1/2]

PCGSolverResult gtsam::PCGSolver::optimizeDetailed ( const GaussianFactorGraph & gfg,
bool collectResidualHistory = true )

Optimize from zero and return convergence diagnostics and phase timings.

Residual history is collected when collectResidualHistory is true.

Parameters
gfgGaussian factor graph defining the normal equations.
collectResidualHistoryWhether to retain per-iteration residuals.
Returns
Solution, convergence diagnostics, and phase timings.

◆ optimizeDetailed() [2/2]

PCGSolverResult gtsam::PCGSolver::optimizeDetailed ( const GaussianFactorGraph & gfg,
const KeyInfo & keyInfo,
const std::map< Key, Vector > & lambda,
const VectorValues & initial,
bool collectResidualHistory = true )

Optimize with explicit metadata and an initial estimate, returning convergence diagnostics and phase timings.

Parameters
gfgGaussian factor graph defining the normal equations.
keyInfoOrdering, dimensions, and scalar offsets for graph keys.
lambdaPer-key damping forwarded to the preconditioner.
initialInitial estimate in keyed form.
collectResidualHistoryWhether to retain per-iteration residuals.
Returns
Solution, convergence diagnostics, and phase timings.

The documentation for this class was generated from the following files:
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/linear/PCGSolver.h
  • /tmp/gtsam-4.3.0-doxygen.rsXPUS/source/gtsam/linear/PCGSolver.cpp