SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
Loading...
Searching...
No Matches
LeastSquareEngineManager.h
Go to the documentation of this file.
1
22
23#ifndef MODELFITTING_LEASTSQUAREENGINEMANAGER_H
24#define MODELFITTING_LEASTSQUAREENGINEMANAGER_H
25
27
28namespace ModelFitting {
29
46public:
47
53
61 static void registerEngine(const std::string& name, FactoryMethod factory_method);
62
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 {
92 };
93};
94
95} // end of namespace ModelFitting
96
97#endif /* MODELFITTING_LEASTSQUAREENGINEMANAGER_H */
Keep a registry of supported engines, and bridge their factory methods.
static std::shared_ptr< LeastSquareEngine > create(const std::string &name, unsigned max_iterations=1000)
static void registerEngine(const std::string &name, FactoryMethod factory_method)
std::function< std::shared_ptr< LeastSquareEngine >(unsigned)> FactoryMethod
static std::vector< std::string > getImplementations()
StaticEngine(const std::string &name, LeastSquareEngineManager::FactoryMethod factory_method)