29 #include "g2o/config.h" 37 #define DIM_TO_SOLVER(p, l) BlockSolver< BlockSolverTraits<p, l> > 39 #define ALLOC_DENSE(s, p, l) \ 41 std::cerr << "# Using DENSE poseDim " << p << " landMarkDim " << l << std::endl; \ 42 DIM_TO_SOLVER(p, l)::LinearSolverType* linearSolver = new LinearSolverDense<DIM_TO_SOLVER(p, l)::PoseMatrixType>(); \ 43 s = new DIM_TO_SOLVER(p, l)(linearSolver); \ 54 string methodName = fullSolverName.substr(0, 2);
55 string solverName = fullSolverName.substr(3);
57 if (solverName ==
"dense") {
60 else if (solverName ==
"dense3_2") {
63 else if (solverName ==
"dense6_3") {
66 else if (solverName ==
"dense7_3") {
71 if (methodName ==
"gn") {
74 else if (methodName ==
"lm") {
DenseSolverCreator(const OptimizationAlgorithmProperty &p)
#define G2O_REGISTER_OPTIMIZATION_ALGORITHM(optimizername, instance)
describe the properties of a solver
#define G2O_REGISTER_OPTIMIZATION_LIBRARY(libraryname)
Implementation of the Levenberg Algorithm.
static OptimizationAlgorithm * createSolver(const std::string &fullSolverName)
Implementation of the Gauss Newton Algorithm.
base for allocating an optimization algorithm
Generic interface for a sparse solver operating on a graph which solves one iteration of the lineariz...
virtual OptimizationAlgorithm * construct()
allocate a solver operating on optimizer, re-implement for your creator
Generic interface for a non-linear solver operating on a graph.
#define ALLOC_DENSE(s, p, l)