48#ifndef GUM_MULTI_DIM_IMPLEMENTATION_H
49#define GUM_MULTI_DIM_IMPLEMENTATION_H
84 template <
typename GUM_ELEMENT >
127 virtual const std::string&
name()
const = 0;
175 virtual const GUM_ELEMENT*
data() const noexcept;
184 virtual GUM_ELEMENT*
data() noexcept;
341 template <
typename GUM_ELEMENT >
Base class for discrete random variable.
Class for assigning/browsing values to tuples of discrete variables.
Generic doubly linked lists.
virtual GUM_ELEMENT get(const Instantiation &i) const
MultiDimContainer()
Default constructor.
<agrum/base/multidim/multiDimImplementation.h>
Idx pos(const DiscreteVariable &v) const override
MultiDimContainer< GUM_ELEMENT > * newFactory() const override=0
void erase(const DiscreteVariable &v) override
void beginMultipleChanges() override
Size domainSize() const override
bool isInMultipleChangeMethod_() const
const Sequence< const DiscreteVariable * > & variablesSequence() const override
void add(const DiscreteVariable &v) override
float compressionRate() const
The compression ratio of the table (depending on the type of implementation).
const DiscreteVariable & variable(Idx i) const override
_InternalChangeState_ _internalChangeState_
MultiDimImplementation()
Default constructor.
bool registerSlave(Instantiation &slave) override
bool unregisterSlave(Instantiation &slave) override
const List< Instantiation * > & slaves_() const
bool empty() const override
Sequence< const DiscreteVariable * > _vars_
_InternalChangeMethod_
Used to represent in which change method this MultiDimImplementation is.
const MultiDimImplementation< GUM_ELEMENT > * content() const final
const std::string & basename() const
Returns the base class name of this MultiDimImplementation.
void endMultipleChanges() override
void replace_(const DiscreteVariable *x, const DiscreteVariable *y) override
void _setNotCommitedChange_()
Change the internalChangeState to NOT_COMMITTED_CHANGE.
MultiDimImplementation(const MultiDimImplementation< GUM_ELEMENT > &from)
Copy constructor.
bool isCommitNeeded_() const
_InternalChangeState_
Used to represent in which change state this MultiDimImplementation is.
virtual void commitMultipleChanges_()
_InternalChangeMethod_ _internalChangeMethod_
List< Instantiation * > _slaveInstantiations_
virtual void invert_(Idx p1, Idx p2)
Idx nbrDim() const override
virtual const GUM_ELEMENT * data() const noexcept
Returns a pointer to the contiguous data buffer, or nullptr if the implementation does not store data...
~MultiDimImplementation() override
Class destructor.
virtual Size realSize() const =0
Returns the real number of parameters used for this table.
bool contains(const DiscreteVariable &v) const override
virtual const std::string & name() const =0
Returns the real name of the multiDim implementation.
The generic class for storing (ordered) sequences of objects.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
Headers of the MultiDimContainer class.
Implementation of gum::MultiDimImplementation.
gum is the global namespace for all aGrUM entities
std::ostream & operator<<(std::ostream &stream, const AVLTree< Val, Cmp > &tree)
display the content of a tree