Safe iterators for Sequence.
void setSon(const NodeId &node, const Idx &modality, const NodeId &sonNode)
Sets nodes son for given modality to designated son node.
bool isTerminalNode(const NodeId &node) const
Indicates if given node is terminal or not.
Idx valFromPtr(const DiscreteVariable *pvar) const
Returns the current value of a given variable.
void setRootNode(const NodeId &root)
Sets root node of decision diagram.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const InternalNode * node(NodeId n) const
Returns internalNode structure associated to that nodeId.
<agrum/FMDP/simulation/statesCounter.h>
const DiscreteVariable * nodeVar() const
Returns the node variable.
const NodeId & terminalNodeId(const GUM_SCALAR &v) const
Returns the id of the terminal node that has the given value.
NodeId son(Idx modality) const
Returns the son at a given index.
NodeId addInternalNode(const DiscreteVariable *var)
Inserts a new non terminal node in graph.
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const Sequence< const DiscreteVariable *> & variablesSequence() const final
Returns the sequence of DiscreteVariable of this instantiation.
virtual Size domainSize() const =0
virtual void add(const DiscreteVariable &v)
Adds a new var to the variables of the multidimensional matrix.
MultiDimFunctionGraph< Size > * __counter
const NodeId & root() const
Returns the id of the root node from the diagram.
Class implementingting a function graph.
~StatesCounter()
Default destructor.
void reset(const Instantiation &)
void __incState(const Instantiation &, NodeId, Idx, Size)
Class for assigning/browsing values to tuples of discrete variables.
void incState(const Instantiation &)
NodeId addTerminalNode(const GUM_SCALAR &value)
Adds a value to the MultiDimFunctionGraph.
Size Idx
Type for indexes.
MultiDimFunctionGraphManager< GUM_SCALAR, TerminalNodePolicy > * manager()
Returns a const reference to the manager of this diagram.
std::size_t Size
In aGrUM, hashed values are unsigned long int.
StatesCounter()
Default constructor.
virtual GUM_SCALAR get(const Instantiation &i) const
Returns the value pointed by i.
Size NodeId
Type for node ids.
void clear()
Clears the function graph.