114 if (moda == state.
valFromPtr(curVar)) parentModa = moda;
Base class for discrete random variable.
virtual Size domainSize() const =0
const NodeId & terminalNodeId(const GUM_ELEMENT &v) const override
Returns the id of the terminal node that has the given value.
Class for assigning/browsing values to tuples of discrete variables.
const Sequence< const DiscreteVariable * > & variablesSequence() const final
Returns the sequence of DiscreteVariable of this instantiation.
Idx valFromPtr(const DiscreteVariable *pvar) const
Returns the current value of a given variable.
const DiscreteVariable * nodeVar() const
Returns the node variable.
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.
void setRootNode(const NodeId &root)
Sets root node of decision diagram.
NodeId addTerminalNode(const GUM_ELEMENT &value)
Adds a value to the MultiDimFunctionGraph.
void setSon(const NodeId &node, const Idx &modality, const NodeId &sonNode)
Sets nodes son for given modality to designated son node.
Class implementingting a function graph.
void clear()
Clears the function graph.
void add(const DiscreteVariable &v) override
Adds a new var to the variables of the multidimensional matrix.
const NodeId & root() const
Returns the id of the root node from the diagram.
bool isTerminalNode(const NodeId &node) const
Indicates if given node is terminal or not.
GUM_ELEMENT get(const Instantiation &i) const override
Returns the value pointed by i.
const InternalNode * node(NodeId n) const
Returns internalNode structure associated to that nodeId.
MultiDimFunctionGraphManager< GUM_ELEMENT, TerminalNodePolicy > * manager()
Returns a const reference to the manager of this diagram.
Safe iterators for Sequence.
void _incState_(const Instantiation &, NodeId, Idx, Size)
StatesCounter()
Default constructor.
void incState(const Instantiation &)
~StatesCounter() override
Default destructor.
void reset(const Instantiation &)
MultiDimFunctionGraph< Size > * _counter_
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Size Idx
Type for indexes.
Size NodeId
Type for node ids.
gum is the global namespace for all aGrUM entities
Headers of the States Counter class.