30 #ifndef GUM_OPERATOR_REGISTER_4_MULTI_DIM_H 31 #define GUM_OPERATOR_REGISTER_4_MULTI_DIM_H 33 #include <agrum/tools/core/hashTable.h> 41 template <
typename GUM_SCALAR >
42 class MultiDimImplementation;
57 template <
typename GUM_SCALAR >
58 class OperatorRegister4MultiDim {
61 typedef MultiDimImplementation< GUM_SCALAR >* (*OperatorPtr)(
62 const MultiDimImplementation< GUM_SCALAR >*,
63 const MultiDimImplementation< GUM_SCALAR >*);
95 void insert(
const std::string& operation_name,
96 const std::string& type1,
97 const std::string& type2,
98 OperatorPtr newFunction);
118 erase(
const std::string& operation_name,
const std::string& type1,
const std::string& type2);
137 bool exists(
const std::string& operation_name,
138 const std::string& type1,
139 const std::string& type2)
const;
162 OperatorPtr get(
const std::string& operation_name,
163 const std::string& type1,
164 const std::string& type2)
const;
178 static OperatorRegister4MultiDim< GUM_SCALAR >& Register();
189 OperatorRegister4MultiDim();
192 OperatorRegister4MultiDim(
const OperatorRegister4MultiDim< GUM_SCALAR >&);
195 ~OperatorRegister4MultiDim();
200 typedef HashTable< std::pair< std::string, std::string >, OperatorPtr > OperatorSet;
211 HashTable< std::string, OperatorSet* > _set_;
215 template <
typename GUM_SCALAR >
216 void registerOperator(
const std::string& operation_name,
217 const std::string& type1,
218 const std::string& type2,
219 typename OperatorRegister4MultiDim< GUM_SCALAR >::OperatorPtr function);
224 #include <agrum/tools/multidim/utils/operators/operatorRegister4MultiDim_tpl.h>