30 #ifndef GUM_PROJECTION_REGISTER_4_MULTI_DIM_H 31 #define GUM_PROJECTION_REGISTER_4_MULTI_DIM_H 33 #include <agrum/tools/core/hashTable.h> 34 #include <agrum/tools/core/set.h> 35 #include <agrum/tools/variables/discreteVariable.h> 43 template <
typename GUM_SCALAR >
44 class MultiDimImplementation;
60 template <
typename GUM_SCALAR >
61 class ProjectionRegister4MultiDim {
64 typedef MultiDimImplementation< GUM_SCALAR >* (*ProjectionPtr)(
65 const MultiDimImplementation< GUM_SCALAR >*,
66 const Set<
const DiscreteVariable* >&);
96 void insert(
const std::string& projection_name,
97 const std::string& type_multidim,
98 ProjectionPtr newFunction);
114 void erase(
const std::string& projection_name,
115 const std::string& type_multidim);
131 bool exists(
const std::string& projection_name,
132 const std::string& type_multidim)
const;
152 ProjectionPtr get(
const std::string& projection_name,
153 const std::string& type_multidim)
const;
167 static ProjectionRegister4MultiDim& Register();
178 ProjectionRegister4MultiDim();
181 ProjectionRegister4MultiDim(
const ProjectionRegister4MultiDim&);
184 ~ProjectionRegister4MultiDim();
189 typedef HashTable< std::string, ProjectionPtr > ProjectionSet;
200 HashTable< std::string, ProjectionSet* > set__;
204 template <
typename GUM_SCALAR >
205 void registerProjection(
206 const std::string& projection_name,
207 const std::string& type_multidim,
208 typename ProjectionRegister4MultiDim< GUM_SCALAR >::ProjectionPtr function);
215 #include <agrum/tools/multidim/utils/operators/projectionRegister4MultiDim_tpl.h>