87 parId =
_counter_->node(parId)->son(parModa);
107 if (parentId)
_counter_->manager()->setSon(parentId, parentModa, varId);
108 else _counter_->manager()->setRootNode(varId);
110 if (moda == state.
valFromPtr(curVar)) parentModa = moda;
117 _counter_->manager()->addTerminalNode(nbVisits + 1));
Base class for discrete random variable.
virtual Size domainSize() const =0
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.
Class implementingting a function graph.
Safe iterators for Sequence.
void _incState_(const Instantiation &, NodeId, Idx, Size)
StatesCounter()
Default constructor.
void incState(const Instantiation &)
void reset(const Instantiation &)
MultiDimFunctionGraph< Size > * _counter_
~StatesCounter()
Default destructor.
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.