37 namespace aggregator {
38 template <
typename GUM_SCALAR >
43 template <
typename GUM_SCALAR >
49 template <
typename GUM_SCALAR >
54 template <
typename GUM_SCALAR >
61 template <
typename GUM_SCALAR >
67 template <
typename GUM_SCALAR >
75 std::vector< Idx > cum(maxVal, 0);
83 for (
Idx j = 0, sumcum = 0; j < maxVal; j++)
84 if ((sumcum += cum[j]) >= half) {
89 for (
Idx j = maxVal - 1, jj = 0, sumcum = 0; jj < maxVal; jj++, j--)
90 if ((sumcum += cum[j]) >= half) {
96 return (maxR + max) / 2;
99 template <
typename GUM_SCALAR >
103 bool& stop_iteration)
const {
Idx nbrDim() const final
Returns the number of variables in the Instantiation.
Base class for discrete random variable.
gum is the global namespace for all aGrUM entities
Abstract base class for all multi dimensionnal containers.
<agrum/multidim/aggregators/multiDimAggregator.h>
Idx val(Idx i) const
Returns the current value of the variable at position i.
virtual Size domainSize() const =0
virtual Idx nbrDim() const override
Returns the number of vars in the multidimensional container.
Class for assigning/browsing values to tuples of discrete variables.
Size Idx
Type for indexes.
const DiscreteVariable & variable(Idx i) const final
Returns the variable at position i in the tuple.