53 template <
typename GUM_SCALAR >
62 template <
typename GUM_SCALAR >
71 template <
typename GUM_SCALAR >
80 template <
typename GUM_SCALAR >
93 template <
typename GUM_SCALAR >
95 const GUM_SCALAR& value)
const {
113 template <
typename GUM_SCALAR >
121 template <
typename GUM_SCALAR >
128 template <
typename GUM_SCALAR >
134 template <
typename GUM_SCALAR >
140 template <
typename GUM_SCALAR >
145 template <
typename GUM_SCALAR >
151 template <
typename GUM_SCALAR >
153 static const std::string str =
"MultiDimSparse";
157 template <
typename GUM_SCALAR >
163 template <
typename GUM_SCALAR >
Base class for discrete random variable.
Class for assigning/browsing values to tuples of discrete variables.
bool isMaster(const MultiDimAdressable *m) const
Indicates whether m is the master of this instantiation.
Abstract base class for all multi dimensionnal containers.
virtual void replace_(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
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.
HashTable< const Instantiation *, Size > offsets_
The position in the array of each slave Instantiation.
virtual void erase(const DiscreteVariable &v)
Removes a var from the variables of the multidimensional matrix.
MultiDimWithOffset()
Class constructor.
Size getOffs_(const Instantiation &i) const
Compute the offset of a Instantiation.
virtual void add(const DiscreteVariable &v)
Adds a new var to the variables of the multidimensional matrix.
Exception : operation not allowed.
#define GUM_ERROR(type, msg)
std::size_t Size
In aGrUM, hashed values are unsigned long int.
gum is the global namespace for all aGrUM entities