53#define GUM_PARTIAL_INSTANTIATION_PATTERN_ALLOWED 1
57#define GUM_MULTI_DIM_DECORATOR_PARTIAL_INST(NAME) \
59 template < typename GUM_ELEMENT > \
60 MultiDimImplementation< GUM_ELEMENT >* \
61 NAME(const MultiDimDecorator< GUM_ELEMENT >& table, \
62 const HashTable< const DiscreteVariable*, Idx >& inst_vars) { \
63 const MultiDimImplementation< GUM_ELEMENT >* impl = table.content(); \
64 return NAME(*impl, inst_vars); \
70#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME partialInstantiationMultiDimArray
72#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME
74#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_IMPL2ARRAY_NAME partialInstantiationMultiDimArray
76#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_IMPL2ARRAY_NAME
78#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_POINTER_NAME partialInstantiationMultiDimArray4Pointers
80#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_POINTER_NAME
82#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_POINTER_IMPL2ARRAY_NAME \
83 partialInstantiationMultiDimArray4Pointers
85#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_POINTER_IMPL2ARRAY_NAME
89#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME partialInstantiationMultiDimImplementation
91#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME
93#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_POINTER_NAME \
94 partialInstantiationMultiDimImplementation4Pointers
96#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME
102#define GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME partialInstantiation
104#undef GUM_MULTI_DIM_PARTIAL_INSTANTIATION_NAME
116 template <
typename GUM_ELEMENT >
119 static std::once_flag first;
120 std::call_once(first, []() {
121 std::string MultiDimArrayString(
"MultiDimArray");
122 std::string MultiDimDecisionDiagramString(
"MultiDimDecisionDiagram");
123 std::string BaseNameString(
"MultiDimImplementation");
133 &partialInstantiationMultiDimImplementation);
138 template <
typename GUM_ELEMENT >
141 static std::once_flag first;
142 std::call_once(first, []() {
143 std::string MultiDimArrayString(
"MultiDimArray");
144 std::string BaseNameString(
"MultiDimImplementation");
155 &partialInstantiationMultiDimImplementation4Pointers);
159 template <
typename GUM_ELEMENT >
164 template <
typename GUM_ELEMENT >
172#undef GUM_PARTIAL_INSTANTIATION_PATTERN_ALLOWED
gum is the global namespace for all aGrUM entities
void partialInstantiation4MultiDimInit()
The function used to register all the instantiation operators on multidimImplementations over non-poi...
MultiDimArray< GUM_ELEMENT > * partialInstantiationMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
A specialized function for instantiating variables in a multiDimArray.
MultiDimArray< GUM_ELEMENT * > * partialInstantiationMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
A specialized function for instantiating variables in a MultiDimArray.
void registerPartialInstantiation(std::string_view instantiation_func_name, std::string_view type_multidim, typename PartialInstantiationRegister4MultiDim< GUM_ELEMENT >::PartialInstantiationPtr function)
A function to more easily register new instantiation functions in MultiDims.
void pointerPartialInstantiation4MultiDimInit()
The function used to register all the instantiations on multidimImplementations over pointers types.
Headers for partial instantiation functions.
#define GUM_MULTI_DIM_DECORATOR_PARTIAL_INST(NAME)
the pattern used by all the partial instantiations of multidimensional tables
the pattern used by all the partial instantiations of multidimensional tables
the pattern used by all the partial instantiations of multidimensional tables
Headers for PartialInstantiationRegister4MultiDim.
void init()
Initialize the partial instantiation functions.