32 template <
typename GUM_SCALAR >
36 __array(from.__array), __name(from.__name) {
44 template <
typename GUM_SCALAR >
56 template <
typename GUM_SCALAR >
68 template <
typename GUM_SCALAR >
73 template <
typename GUM_SCALAR >
79 template <
typename GUM_SCALAR >
85 template <
typename GUM_SCALAR >
90 template <
typename GUM_SCALAR >
95 template <
typename GUM_SCALAR >
100 template <
typename GUM_SCALAR >
105 template <
typename GUM_SCALAR >
110 template <
typename GUM_SCALAR >
115 template <
typename GUM_SCALAR >
125 template <
typename GUM_SCALAR >
127 const GUM_SCALAR& value)
const {
131 template <
typename GUM_SCALAR >
133 const std::vector< GUM_SCALAR >& v)
const {
137 template <
typename GUM_SCALAR >
139 std::initializer_list< GUM_SCALAR > l)
const {
143 template <
typename GUM_SCALAR >
149 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)
Headers of the MultiDimBijArray class.
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.
gum is the global namespace for all aGrUM entities
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.