32 #define DIM_TO_SOLVER(p, l) BlockSolver< BlockSolverTraits<p, l> > 34 #define ALLOC_CSPARSE(s, p, l, blockorder) \ 36 std::cerr << "# Using CSparse poseDim " << p << " landMarkDim " << l << " blockordering " << blockorder << std::endl; \ 37 LinearSolverCSparse< DIM_TO_SOLVER(p, l)::PoseMatrixType >* linearSolver = new LinearSolverCSparse<DIM_TO_SOLVER(p, l)::PoseMatrixType>(); \ 38 linearSolver->setBlockOrdering(blockorder); \ 39 s = new DIM_TO_SOLVER(p, l)(linearSolver); \ 53 string methodName = fullSolverName.substr(0, 2);
54 string solverName = fullSolverName.substr(3);
56 if (solverName ==
"var") {
59 else if (solverName ==
"fix3_2") {
62 else if (solverName ==
"fix6_3") {
65 else if (solverName ==
"fix7_3") {
68 # ifdef ADD_SCALAR_ORDERING 69 else if (solverName ==
"fix3_2_scalar") {
72 else if (solverName ==
"fix6_3_scalar") {
75 else if (solverName ==
"fix7_3_scalar") {
81 if (methodName ==
"gn") {
84 else if (methodName ==
"lm") {
87 else if (methodName ==
"dl") {
117 #ifdef ADD_SCALAR_ORDERING CSparseSolverCreator(const OptimizationAlgorithmProperty &p)
#define G2O_REGISTER_OPTIMIZATION_ALGORITHM(optimizername, instance)
virtual OptimizationAlgorithm * construct()
allocate a solver operating on optimizer, re-implement for your creator
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...
#define ALLOC_CSPARSE(s, p, l, blockorder)
Implementation of Powell's Dogleg Algorithm.
Generic interface for a non-linear solver operating on a graph.
base for the block solvers with some basic function interfaces