35 template <
typename GUM_SCALAR >
39 __array(from.__array), __name(from.__name) {
47 template <
typename GUM_SCALAR >
59 template <
typename GUM_SCALAR >
71 template <
typename GUM_SCALAR >
76 template <
typename GUM_SCALAR >
82 template <
typename GUM_SCALAR >
88 template <
typename GUM_SCALAR >
93 template <
typename GUM_SCALAR >
98 template <
typename GUM_SCALAR >
103 template <
typename GUM_SCALAR >
108 template <
typename GUM_SCALAR >
113 template <
typename GUM_SCALAR >
118 template <
typename GUM_SCALAR >
128 template <
typename GUM_SCALAR >
130 const GUM_SCALAR& value)
const {
134 template <
typename GUM_SCALAR >
136 const std::vector< GUM_SCALAR >& v)
const {
140 template <
typename GUM_SCALAR >
142 std::initializer_list< GUM_SCALAR > l)
const {
146 template <
typename GUM_SCALAR >
152 template <
typename GUM_SCALAR >
virtual GUM_SCALAR & _get(const Instantiation &i) const
Return a data, given a Instantiation.
const MultiDimArray< GUM_SCALAR > & __array
The true data.
const T2 & second(const T1 &first) const
Returns the second value of a pair given its first value.
Decorator of a MultiDimArray, using a bijection over the variables.
virtual const std::string & name() const
Returns the real name of the multiDim implementation.
HashTable< const Instantiation *, Size > _offsets
The position in the array of each slave Instantiation.
MultiDimBijArray< GUM_SCALAR > & operator=(const MultiDimBijArray< GUM_SCALAR > &from)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void fill(const GUM_SCALAR &d) const
This will raise an exception: you can't change the data.
virtual Size realSize() const
Returns the real number of parameters used for this table.
std::string __name
The class name.
virtual GUM_SCALAR get(const Instantiation &i) const
Returns the value pointed by i.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
virtual void _commitMultipleChanges()
Synchronize content after MultipleChanges.
virtual void add(const DiscreteVariable &v)
Adds a new var to the variables of the multidimensional matrix.
virtual void set(const Instantiation &i, const GUM_SCALAR &value) const
virtual MultiDimBijArray< GUM_SCALAR > * newFactory() const
Class constructor.
MultiDimBijArray(const VarBijection &bijection, const MultiDimArray< GUM_SCALAR > &array)
Class constructor.
virtual void populate(const std::vector< GUM_SCALAR > &v) const
This will raise an exception: you can't change the variables in a MultiDimBijArray.
Abstract class for Multidimensional matrix stored as an array in memory and with an offset associated...
virtual void _replace(const DiscreteVariable *x, const DiscreteVariable *y) override
Replace variable x by y.
Multidimensional matrix stored as an array in memory.
Set of pairs of elements with fast search for both elements.
Size _getOffs(const Instantiation &i) const
Compute the offset of a Instantiation.
virtual void add(const DiscreteVariable &v)
This will raise an exception: you can't change the variables in a MultiDimBijArray.
virtual const Sequence< const DiscreteVariable *> & variablesSequence() const override
Returns a const ref to the sequence of DiscreteVariable*.
Class for assigning/browsing values to tuples of discrete variables.
virtual ~MultiDimBijArray()
Class destructor.
bool isMaster(const MultiDimAdressable *m) const
Indicates whether m is the master of this instantiation.
virtual void erase(const DiscreteVariable &v)
This will raise an exception: you can't change the variables in a MultiDimBijArray.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
#define GUM_ERROR(type, msg)
virtual void _replace(const DiscreteVariable *x, const DiscreteVariable *y)
Replace variable x by y.