48#ifndef GUM_MULTI_DIM_SPARSE_H
49#define GUM_MULTI_DIM_SPARSE_H
71 template <
typename GUM_ELEMENT >
122 void fill(
const GUM_ELEMENT& d)
const override;
128 const std::string&
name()
const override;
162#ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
Base class for discrete random variable.
Class for assigning/browsing values to tuples of discrete variables.
Abstract base class for all multi dimensionnal containers.
Multidimensional matrix stored as a sparse array in memory.
void fill(const GUM_ELEMENT &d) const override
Fill the table with d.
MultiDimContainer< GUM_ELEMENT > * newFactory() const override
Class constructor.
~MultiDimSparse() override
Copy operator.
const std::string & name() const override
Returns the real name of the multiDim implementation.
void add(const DiscreteVariable &v) override
Adds a new var to the variables of the multidimensional matrix.
GUM_ELEMENT get(const Instantiation &i) const override
Returns the value pointed by i.
void set(const Instantiation &i, const GUM_ELEMENT &value) const override
Changes the value pointed by i.
HashTable< Size, GUM_ELEMENT > params_
The true data : the values is mutable since we can change the value in a const multiDimArray.
GUM_ELEMENT & get_(const Instantiation &i) const override
void erase(const DiscreteVariable &v) override
Removes a var from the variables of the multidimensional matrix.
void replace_(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
GUM_ELEMENT default_
The default value.
Size realSize() const override
Returns the real number of parameters used for this table.
MultiDimSparse(const GUM_ELEMENT &default_value)
Default constructor: creates an empty null dimensional matrix.
void commitMultipleChanges_() override
Synchronise content after MultipleChanges.
MultiDimWithOffset()
Class constructor.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Implementation of MultiDimSparse.
Headers of the MultiDimWithOffset class.
gum is the global namespace for all aGrUM entities