create solvers based on their short name More...
#include <solver_factory.h>
Public Types | |
| typedef std::list < AbstractSolverCreator * > | CreatorList |
Public Member Functions | |
| Solver * | construct (const std::string &tag, SparseOptimizer *optimizer, SolverProperty &solverProperty) const |
| const CreatorList & | creatorList () const |
| return the underlying list of creators | |
| void | listSolvers (std::ostream &os) const |
| list the known solvers into a stream | |
| void | registerSolver (AbstractSolverCreator *c) |
Static Public Member Functions | |
| static void | destroy () |
| free the instance | |
| static SolverFactory * | instance () |
| return the instance | |
Protected Member Functions | |
| CreatorList::const_iterator | findSolver (const std::string &name) const |
| CreatorList::iterator | findSolver (const std::string &name) |
| SolverFactory () | |
| ~SolverFactory () | |
Protected Attributes | |
| CreatorList | _creator |
Static Private Attributes | |
| static SolverFactory * | factoryInstance = 0 |
create solvers based on their short name
Factory to allocate solvers based on their short name. The Factory is implemented as a sigleton and the single instance can be accessed via the instance() function.
Definition at line 55 of file solver_factory.h.
Definition at line 58 of file solver_factory.h.
| g2o::SolverFactory::SolverFactory | ( | ) | [protected] |
Definition at line 34 of file solver_factory.cpp.
| g2o::SolverFactory::~SolverFactory | ( | ) | [protected] |
Definition at line 38 of file solver_factory.cpp.
| Solver * g2o::SolverFactory::construct | ( | const std::string & | tag, |
| SparseOptimizer * | optimizer, | ||
| SolverProperty & | solverProperty | ||
| ) | const |
construct a solver based on its name, e.g., var, fix3_2_cholmod
Definition at line 64 of file solver_factory.cpp.
| const CreatorList& g2o::SolverFactory::creatorList | ( | ) | const [inline] |
return the underlying list of creators
Definition at line 80 of file solver_factory.h.
| void g2o::SolverFactory::destroy | ( | ) | [static] |
free the instance
Definition at line 74 of file solver_factory.cpp.
| SolverFactory::CreatorList::const_iterator g2o::SolverFactory::findSolver | ( | const std::string & | name | ) | const [protected] |
Definition at line 88 of file solver_factory.cpp.
| SolverFactory::CreatorList::iterator g2o::SolverFactory::findSolver | ( | const std::string & | name | ) | [protected] |
Definition at line 98 of file solver_factory.cpp.
| SolverFactory * g2o::SolverFactory::instance | ( | ) | [static] |
return the instance
Definition at line 44 of file solver_factory.cpp.
| void g2o::SolverFactory::listSolvers | ( | std::ostream & | os | ) | const |
list the known solvers into a stream
Definition at line 80 of file solver_factory.cpp.
register a specific creator for allocating a solver
Definition at line 52 of file solver_factory.cpp.
CreatorList g2o::SolverFactory::_creator [protected] |
Definition at line 86 of file solver_factory.h.
SolverFactory * g2o::SolverFactory::factoryInstance = 0 [static, private] |
Definition at line 92 of file solver_factory.h.