g2o
|
create solvers based on their short name More...
#include <optimization_algorithm_factory.h>
Public Types | |
typedef std::list< AbstractOptimizationAlgorithmCreator * > | CreatorList |
Public Member Functions | |
void | registerSolver (AbstractOptimizationAlgorithmCreator *c) |
void | unregisterSolver (AbstractOptimizationAlgorithmCreator *c) |
OptimizationAlgorithm * | construct (const std::string &tag, OptimizationAlgorithmProperty &solverProperty) const |
void | listSolvers (std::ostream &os) const |
list the known solvers into a stream More... | |
const CreatorList & | creatorList () const |
return the underlying list of creators More... | |
Static Public Member Functions | |
static OptimizationAlgorithmFactory * | instance () |
return the instance More... | |
static void | destroy () |
free the instance More... | |
Protected Member Functions | |
OptimizationAlgorithmFactory () | |
~OptimizationAlgorithmFactory () | |
CreatorList::const_iterator | findSolver (const std::string &name) const |
CreatorList::iterator | findSolver (const std::string &name) |
Protected Attributes | |
CreatorList | _creator |
Static Private Attributes | |
static OptimizationAlgorithmFactory * | 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 75 of file optimization_algorithm_factory.h.
typedef std::list<AbstractOptimizationAlgorithmCreator*> g2o::OptimizationAlgorithmFactory::CreatorList |
Definition at line 78 of file optimization_algorithm_factory.h.
|
protected |
Definition at line 44 of file optimization_algorithm_factory.cpp.
|
protected |
Definition at line 48 of file optimization_algorithm_factory.cpp.
OptimizationAlgorithm * g2o::OptimizationAlgorithmFactory::construct | ( | const std::string & | tag, |
OptimizationAlgorithmProperty & | solverProperty | ||
) | const |
construct a solver based on its name, e.g., var, fix3_2_cholmod
Definition at line 84 of file optimization_algorithm_factory.cpp.
Referenced by MainWindow::allocateSolver(), g2o::SparseOptimizerOnline::initSolver(), and main().
|
inline |
return the underlying list of creators
Definition at line 105 of file optimization_algorithm_factory.h.
|
static |
free the instance
Definition at line 95 of file optimization_algorithm_factory.cpp.
|
protected |
Definition at line 117 of file optimization_algorithm_factory.cpp.
References g2o::OptimizationAlgorithmProperty::name.
|
protected |
Definition at line 127 of file optimization_algorithm_factory.cpp.
References g2o::OptimizationAlgorithmProperty::name.
|
static |
return the instance
Definition at line 54 of file optimization_algorithm_factory.cpp.
Referenced by g2o::SparseOptimizerOnline::initSolver(), main(), g2o::RegisterOptimizationAlgorithmProxy::RegisterOptimizationAlgorithmProxy(), and g2o::RegisterOptimizationAlgorithmProxy::~RegisterOptimizationAlgorithmProxy().
void g2o::OptimizationAlgorithmFactory::listSolvers | ( | std::ostream & | os | ) | const |
list the known solvers into a stream
Definition at line 101 of file optimization_algorithm_factory.cpp.
References g2o::OptimizationAlgorithmProperty::desc, and g2o::OptimizationAlgorithmProperty::name.
Referenced by main().
void g2o::OptimizationAlgorithmFactory::registerSolver | ( | AbstractOptimizationAlgorithmCreator * | c | ) |
register a specific creator for allocating a solver
Definition at line 62 of file optimization_algorithm_factory.cpp.
References g2o::OptimizationAlgorithmProperty::name, and g2o::AbstractOptimizationAlgorithmCreator::property().
Referenced by g2o::RegisterOptimizationAlgorithmProxy::RegisterOptimizationAlgorithmProxy().
void g2o::OptimizationAlgorithmFactory::unregisterSolver | ( | AbstractOptimizationAlgorithmCreator * | c | ) |
unregister a specific creator for allocating a solver
Definition at line 74 of file optimization_algorithm_factory.cpp.
References g2o::OptimizationAlgorithmProperty::name, and g2o::AbstractOptimizationAlgorithmCreator::property().
Referenced by g2o::RegisterOptimizationAlgorithmProxy::~RegisterOptimizationAlgorithmProxy().
|
protected |
Definition at line 111 of file optimization_algorithm_factory.h.
|
staticprivate |
Definition at line 117 of file optimization_algorithm_factory.h.
Referenced by g2o::AbstractOptimizationAlgorithmCreator::AbstractOptimizationAlgorithmCreator().