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