SourceXtractorPlusPlus
0.10
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
78
static
std::shared_ptr<LeastSquareEngine>
create
(
const
std::string
&name,
unsigned
max_iterations = 1000);
79
83
struct
StaticEngine
{
84
StaticEngine
(
const
std::string
& name,
LeastSquareEngineManager::FactoryMethod
factory_method) {
85
LeastSquareEngineManager::registerEngine
(name, factory_method);
86
}
87
};
88
};
89
90
}
// end of namespace ModelFitting
91
92
#endif
/* MODELFITTING_LEASTSQUAREENGINEMANAGER_H */
ModelFitting::LeastSquareEngineManager::StaticEngine
Definition:
LeastSquareEngineManager.h:83
ModelFitting::LeastSquareEngineManager::create
static std::shared_ptr< LeastSquareEngine > create(const std::string &name, unsigned max_iterations=1000)
Definition:
LeastSquareEngineManager.cpp:52
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:84
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.17