aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::PartialInstantiation4MultiDimInitialize< GUM_SCALAR > Class Template Reference

A class used to register instantiation functions over non-pointers types. More...

#include <partialInstantiation4MultiDim.h>

Public Member Functions

void init ()
 Initialize the partial instantiation functions. More...
 

Detailed Description

template<typename GUM_SCALAR>
class gum::PartialInstantiation4MultiDimInitialize< GUM_SCALAR >

A class used to register instantiation functions over non-pointers types.

A class used to register instantiation functions over pointers types.

This class is of course completely redundant with function partialInstantiation4MultiDimInit. Its aim is to enable specialization of function partialInstantiation4MultiDimInit for pointer types: C++ allows partial specialization of templated classes (e.g., create different implementations for C<T> and C<T*>) but it does not allows partial specialization for functions. Hence, by creating a class the primary purpose of which is to run function partialInstantiation4MultiDimInit, we allow this partial specialization. This is most effective to produce different codes for pointer types and non-pointer types.

Template Parameters
GUM_SCALARThe type of scalars stored in the multidimensional table.

This class is of course completely redundant with function pointerPartialInstantiation4MultiDimInit. Its aim is to enable different implementations of the instantiation functions for multidims depending in whether these multidim contain pointers or not. Actually, C++ allows partial specialization of templated classes (e.g., create different implementations for C<T> and C<T*>) but it does not allows partial specialization for functions. Hence, by creating a class the primary purpose of which is to run function partialInstantiation4MultiDimInit or pointerPartialInstantiation4MultiDimInit, we allow this partial specialization to obtain.

Template Parameters
GUM_SCALARThe type of scalars stored in the multidimensional table as pointer.

Definition at line 209 of file partialInstantiation4MultiDim.h.

Member Function Documentation

◆ init()

template<typename GUM_SCALAR >
void gum::PartialInstantiation4MultiDimInitialize< GUM_SCALAR >::init ( )
inline

Initialize the partial instantiation functions.

Definition at line 213 of file partialInstantiation4MultiDim.h.

213 { partialInstantiation4MultiDimInit< GUM_SCALAR >(); };

The documentation for this class was generated from the following file: