37 #define DIM_TO_SOLVER(p, l) BlockSolver< BlockSolverTraits<p, l> > 39 #define ALLOC_PCG(s, p, l) \ 41 std::cerr << "# Using PCG poseDim " << p << " landMarkDim " << l << std::endl; \ 42 DIM_TO_SOLVER(p, l)::LinearSolverType* linearSolver = new LinearSolverPCG<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 ==
"pcg") {
60 else if (solverName ==
"pcg3_2") {
63 else if (solverName ==
"pcg6_3") {
66 else if (solverName ==
"pcg7_3") {
71 if (methodName ==
"gn") {
74 else if (methodName ==
"lm") {
#define G2O_REGISTER_OPTIMIZATION_ALGORITHM(optimizername, instance)
describe the properties of a solver
#define G2O_REGISTER_OPTIMIZATION_LIBRARY(libraryname)
Implementation of the Levenberg Algorithm.
#define ALLOC_PCG(s, p, l)
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...
PCGSolverCreator(const OptimizationAlgorithmProperty &p)
Generic interface for a non-linear solver operating on a graph.
virtual OptimizationAlgorithm * construct()
allocate a solver operating on optimizer, re-implement for your creator