41 #define DIM_TO_SOLVER(p, l) BlockSolver< BlockSolverTraits<p, l> > 43 #define ALLOC_CHOLMOD(s, p, l, blockorder) \ 45 std::cerr << "# Using CHOLMOD poseDim " << p << " landMarkDim " << l << " blockordering " << blockorder << std::endl; \ 46 LinearSolverCholmod < DIM_TO_SOLVER(p, l)::PoseMatrixType >* linearSolver = new LinearSolverCholmod<DIM_TO_SOLVER(p, l)::PoseMatrixType>(); \ 47 linearSolver->setBlockOrdering(blockorder); \ 48 s = new DIM_TO_SOLVER(p, l)(linearSolver); \ 59 string methodName = fullSolverName.substr(0, 2);
60 string solverName = fullSolverName.substr(3);
62 if (solverName ==
"var_cholmod") {
65 else if (solverName ==
"fix3_2_cholmod") {
68 else if (solverName ==
"fix6_3_cholmod") {
71 else if (solverName ==
"fix7_3_cholmod") {
74 #ifdef ADD_SCALAR_ORDERING 75 else if (solverName ==
"fix3_2_cholmod_scalar") {
78 else if (solverName ==
"fix6_3_cholmod_scalar") {
81 else if (solverName ==
"fix7_3_cholmod_scalar") {
87 if (methodName ==
"gn") {
90 else if (methodName ==
"lm") {
93 else if (methodName ==
"dl") {
125 #ifdef ADD_SCALAR_ORDERING #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...
Implementation of Powell's Dogleg Algorithm.
CholmodSolverCreator(const OptimizationAlgorithmProperty &p)
Generic interface for a non-linear solver operating on a graph.
#define ALLOC_CHOLMOD(s, p, l, blockorder)
base for the block solvers with some basic function interfaces
virtual OptimizationAlgorithm * construct()
allocate a solver operating on optimizer, re-implement for your creator