BioDynaMo
v1.05.120-25dc9790
|
Go to the documentation of this file.
15 #ifndef CORE_MULTI_SIMULATION_ALGORITHM_ALGORITHM_REGISTRY_H_
16 #define CORE_MULTI_SIMULATION_ALGORITHM_ALGORITHM_REGISTRY_H_
18 #include <unordered_map>
25 namespace experimental {
27 class MultiSimulationManager;
60 #define BDM_REGISTER_ALGO(op) \
61 bool op::registered_ = \
62 AlgorithmRegistry::GetInstance()->AddAlgorithm(#op, new op());
66 #define BDM_ALGO_HEADER() \
68 static bool registered_;
73 for (
auto param : opt_params->
params) {
84 #endif // CORE_MULTI_SIMULATION_ALGORITHM_ALGORITHM_REGISTRY_H_
std::unordered_map< std::string, Algorithm * > algorithms_
The map containing the algorithms; accessible by their name.
An interface for creating new optimization algorithms.
Registry of all optimization algorithms.
bool AddAlgorithm(const std::string &algo_name, Algorithm *algo)
Algorithm * GetAlgorithm(const std::string &algo_name)
std::vector< OptimizationParamType * > params
static AlgorithmRegistry * GetInstance()
Singleton class - returns the static instance.
Algorithm * CreateOptimizationAlgorithm(OptimizationParam *opt_params)