SourceXtractorPlusPlus
0.15
Please provide a description of the project.
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 */
ModelFitting::LeastSquareEngineManager::StaticEngine
Definition:
LeastSquareEngineManager.h:88
ModelFitting::LeastSquareEngineManager::getDefault
static std::string getDefault()
Definition:
LeastSquareEngineManager.cpp:52
ModelFitting::LeastSquareEngineManager::create
static std::shared_ptr< LeastSquareEngine > create(const std::string &name, unsigned max_iterations=1000)
Definition:
LeastSquareEngineManager.cpp:65
std::string
STL class.
std::shared_ptr
STL class.
std::vector< std::string >
std::function
ModelFitting::LeastSquareEngineManager::StaticEngine::StaticEngine
StaticEngine(const std::string &name, LeastSquareEngineManager::FactoryMethod factory_method)
Definition:
LeastSquareEngineManager.h:89
ModelFitting::LeastSquareEngineManager
Keep a registry of supported engines, and bridge their factory methods.
Definition:
LeastSquareEngineManager.h:45
LeastSquareEngine.h
ModelFitting::LeastSquareEngineManager::getImplementations
static std::vector< std::string > getImplementations()
Definition:
LeastSquareEngineManager.cpp:44
ModelFitting
Definition:
AsinhChiSquareComparator.h:30
ModelFitting::LeastSquareEngineManager::registerEngine
static void registerEngine(const std::string &name, FactoryMethod factory_method)
Definition:
LeastSquareEngineManager.cpp:37
Generated by
1.8.20