48#ifndef GUM_MULTI_DIM_SPARSE_H
49#define GUM_MULTI_DIM_SPARSE_H
71 template <
typename GUM_SCALAR >
122 virtual void fill(
const GUM_SCALAR& d)
const;
128 virtual const std::string&
name()
const;
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.
virtual Size realSize() const
Returns the real number of parameters used for this table.
MultiDimSparse(const GUM_SCALAR &default_value)
Default constructor: creates an empty null dimensional matrix.
void add(const DiscreteVariable &v)
Adds a new var to the variables of the multidimensional matrix.
void erase(const DiscreteVariable &v)
Removes a var from the variables of the multidimensional matrix.
virtual ~MultiDimSparse()
Copy operator.
virtual void set(const Instantiation &i, const GUM_SCALAR &value) const
Changes the value pointed by i.
virtual void fill(const GUM_SCALAR &d) const
Fill the table with d.
GUM_SCALAR default_
The default value.
virtual MultiDimContainer< GUM_SCALAR > * newFactory() const
Class constructor.
virtual GUM_SCALAR & get_(const Instantiation &i) const
virtual void commitMultipleChanges_()
Synchronise content after MultipleChanges.
virtual const std::string & name() const
Returns the real name of the multiDim implementation.
HashTable< Size, GUM_SCALAR > params_
The true data : the values is mutable since we can change the value in a const multiDimArray.
virtual void replace_(const DiscreteVariable *x, const DiscreteVariable *y)
Replace variable x by y.
virtual GUM_SCALAR get(const Instantiation &i) const
Returns the value pointed by i.
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