SourceXtractorPlusPlus
0.13
Please provide a description of the project.
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
ModelFitting
ModelFitting
Engine
LeastSquareEngineManager.h
Go to the documentation of this file.
1
23
#ifndef MODELFITTING_LEASTSQUAREENGINEMANAGER_H
24
#define MODELFITTING_LEASTSQUAREENGINEMANAGER_H
25
26
#include "
ModelFitting/Engine/LeastSquareEngine.h
"
27
28
namespace
ModelFitting {
29
45
class
LeastSquareEngineManager
{
46
public
:
47
52
using
FactoryMethod
=
std::function<std::shared_ptr<LeastSquareEngine>
(unsigned)>;
53
61
static
void
registerEngine
(
const
std::string
& name,
FactoryMethod
factory_method);
62
66
static
std::vector<std::string>
getImplementations
();
67
71
static
std::string
getDefault
();
72
83
static
std::shared_ptr<LeastSquareEngine>
create
(
const
std::string
&name,
unsigned
max_iterations = 1000);
84
88
struct
StaticEngine
{
89
StaticEngine
(
const
std::string
& name,
LeastSquareEngineManager::FactoryMethod
factory_method) {
90
LeastSquareEngineManager::registerEngine
(name, factory_method);
91
}
92
};
93
};
94
95
}
// end of namespace ModelFitting
96
97
#endif
/* MODELFITTING_LEASTSQUAREENGINEMANAGER_H */
std::shared_ptr
std::function
ModelFitting::LeastSquareEngineManager::getImplementations
static std::vector< std::string > getImplementations()
Definition:
LeastSquareEngineManager.cpp:44
ModelFitting::LeastSquareEngineManager::registerEngine
static void registerEngine(const std::string &name, FactoryMethod factory_method)
Definition:
LeastSquareEngineManager.cpp:37
ModelFitting::LeastSquareEngineManager::getDefault
static std::string getDefault()
Definition:
LeastSquareEngineManager.cpp:52
std::string
STL class.
ModelFitting::LeastSquareEngineManager
Keep a registry of supported engines, and bridge their factory methods.
Definition:
LeastSquareEngineManager.h:45
ModelFitting::LeastSquareEngineManager::StaticEngine::StaticEngine
StaticEngine(const std::string &name, LeastSquareEngineManager::FactoryMethod factory_method)
Definition:
LeastSquareEngineManager.h:89
LeastSquareEngine.h
std::vector< std::string >
ModelFitting::LeastSquareEngineManager::create
static std::shared_ptr< LeastSquareEngine > create(const std::string &name, unsigned max_iterations=1000)
Definition:
LeastSquareEngineManager.cpp:65
ModelFitting::LeastSquareEngineManager::StaticEngine
Definition:
LeastSquareEngineManager.h:88
Generated by
1.8.5