60 template < GUM_Numeric GUM_SCALAR >
65 template < GUM_Numeric GUM_SCALAR >
71 template < GUM_Numeric GUM_SCALAR >
76 template < GUM_Numeric GUM_SCALAR >
81 template < GUM_Numeric GUM_SCALAR >
86 template < GUM_Numeric GUM_SCALAR >
89 if (i.
nbrDim() < 2)
return 0;
94 for (
Idx j = 2; j < this->
nbrDim(); j++) {
102 template < GUM_Numeric GUM_SCALAR >
106 bool& stop_iteration)
const {
110 template < GUM_Numeric GUM_SCALAR >
Base class for discrete random variable.
Class for assigning/browsing values to tuples of discrete variables.
Idx val(Idx i) const
Returns the current value of the variable at position i.
Idx nbrDim() const final
Returns the number of variables in the Instantiation.
Idx nbrDim() const override
std::string aggregatorName() const override
Returns the scalar parameter of this aggregator, if it has one.
Idx fold_(const DiscreteVariable &v, Idx i1, Idx i2, bool &stop_iteration) const override
fold_ is applied on value i1 for variable v. the actual result for precedent applications is i2.
Idx buildValue_(const gum::Instantiation &i) const override
by default, buildValue_ uses a "fold" scheme and the user has to implement neutralElt_ and fold_ but ...
MultiDimContainer< GUM_SCALAR > * newFactory() const override
This method creates a clone of this object, withouth its content (including variable),...
Idx neutralElt_() const override
neutralElt_() is the result value for the first application of fold_
Size Idx
Type for indexes.
Aggregators are functional description of CPTs.
gum is the global namespace for all aGrUM entities