30 #ifndef GUM_MULTI_DIM_WITH_OFFSET_H 31 #define GUM_MULTI_DIM_WITH_OFFSET_H 51 template <
typename GUM_SCALAR >
99 virtual void fill(
const GUM_SCALAR& d)
const = 0;
virtual void setLastNotification(const Instantiation &i)
Listen to setLast in a given Instantiation.
Instantiation & fromOffset(Instantiation &i, Size offset) const
Set the Instantiation to the values corresponding to the offset (in this array).
void _computeInstantiationValue(Instantiation &result, Size indice) const
For a given index of a value in the vector values, this method computes the corresponding instantiati...
void setDecNotification(const Instantiation &i)
Listen to increment in each recorded Instantiation.
Size toOffset(const Instantiation &i) const
Compute offset from an Instantiation (in this array).
virtual bool unregisterSlave(Instantiation &i)
Unregister i as a slave of this MultiDimAdressable.
virtual void fill(const GUM_SCALAR &d) const =0
Fill the table with d.
HashTable< const Instantiation *, Size > _offsets
The position in the array of each slave Instantiation.
virtual void setChangeNotification(const Instantiation &i)
Listen to an assignment of a value in a Instantiation.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual GUM_SCALAR & _get(const Instantiation &i) const =0
Return a data, given a Instantiation.
virtual const std::string toString() const
Returns a representation of this MultiDimContainer.
virtual void changeNotification(const Instantiation &i, const DiscreteVariable *const var, Idx oldval, Idx newval)
Listen to changes in a given Instantiation.
MultiDimWithOffset< GUM_SCALAR > & operator=(const MultiDimWithOffset< GUM_SCALAR > &from)
Copy operator.
HashTable< const DiscreteVariable *, Size > _gaps
The gaps between consecutive values of a given variable.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Abstract base class for all multi dimensionnal containers.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual ~MultiDimWithOffset()
Class destrucor.
virtual void add(const DiscreteVariable &v)
Adds a new var to the variables of the multidimensional matrix.
The class for generic Hash Tables.
Abstract class for Multidimensional matrix stored as an array in memory and with an offset associated...
MultiDimWithOffset()
Class constructor.
void setIncNotification(const Instantiation &i)
Listen to increment in a given Instantiation.
virtual void erase(const DiscreteVariable &v)
Removes a var from the variables of the multidimensional matrix.
Size _getOffs(const Instantiation &i) const
Compute the offset of a Instantiation.
virtual MultiDimContainer< GUM_SCALAR > * newFactory() const =0
Class constructor.
Class for assigning/browsing values to tuples of discrete variables.
virtual void setFirstNotification(const Instantiation &i)
Listen to setFirst in a given Instantiation.
<agrum/multidim/multiDimImplementation.h>
Size Idx
Type for indexes.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
virtual bool registerSlave(Instantiation &i)
Register i as a slave of this MultiDimAdressable.