50#ifndef GUM_OPERATOR_REGISTER_4_MULTI_DIM_H
51#define GUM_OPERATOR_REGISTER_4_MULTI_DIM_H
63 template <
typename GUM_SCALAR >
80 template <
typename GUM_SCALAR >
118 void insert(
const std::string& operation_name,
119 const std::string& type1,
120 const std::string& type2,
140 void erase(
const std::string& operation_name,
141 const std::string& type1,
142 const std::string& type2);
161 bool exists(
const std::string& operation_name,
162 const std::string& type1,
163 const std::string& type2)
const;
187 const std::string& type1,
188 const std::string& type2)
const;
239 template <
typename GUM_SCALAR >
241 const std::string& type1,
242 const std::string& type2,
The class for generic Hash Tables.
<agrum/base/multidim/multiDimImplementation.h>
~OperatorRegister4MultiDim()
Destructor.
void insert(const std::string &operation_name, const std::string &type1, const std::string &type2, OperatorPtr newFunction)
adds a new entry into the register
MultiDimImplementation< GUM_SCALAR > *(*)(const MultiDimImplementation< GUM_SCALAR > *, const MultiDimImplementation< GUM_SCALAR > *) OperatorPtr
The type of functions used by the register.
void erase(const std::string &operation_name, const std::string &type1, const std::string &type2)
removes a given entry from the register
OperatorRegister4MultiDim()
Default constructor: creates an empty register.
OperatorPtr get(const std::string &operation_name, const std::string &type1, const std::string &type2) const
returns the specialized operator assigned to a given pair of MultiDimImplementations
HashTable< std::pair< std::string, std::string >, OperatorPtr > OperatorSet
The set of associations for a given operation type.
static OperatorRegister4MultiDim< GUM_SCALAR > & Register()
A named constructor that constructs one and only one Register per data type.
bool exists(const std::string &operation_name, const std::string &type1, const std::string &type2) const
Indicates whether a given entry exists in the register.
HashTable< std::string, OperatorSet * > _set_
A mapping from pairs of types of MultiDimImplementations to operators.
Class hash tables iterators.
gum is the global namespace for all aGrUM entities
void registerOperator(const std::string &operation_name, const std::string &type1, const std::string &type2, typename OperatorRegister4MultiDim< GUM_SCALAR >::OperatorPtr function)
A function to more easily register new operators in MultiDims.
A container for registering binary functions on multiDimImplementations.