31 #include <agrum/tools/multidim/aggregators/forall.h> 35 namespace aggregator {
36 template <
typename GUM_SCALAR >
37 INLINE Forall< GUM_SCALAR >::Forall(Idx value) :
38 MultiDimAggregator< GUM_SCALAR >(), _value_(value) {
39 GUM_CONSTRUCTOR(Forall);
42 template <
typename GUM_SCALAR >
43 INLINE Forall< GUM_SCALAR >::Forall(
const Forall< GUM_SCALAR >& from) :
44 MultiDimAggregator< GUM_SCALAR >(from) {
45 _value_ = from._value_;
49 template <
typename GUM_SCALAR >
50 INLINE Forall< GUM_SCALAR >::~Forall() {
51 GUM_DESTRUCTOR(Forall);
54 template <
typename GUM_SCALAR >
55 INLINE Idx Forall< GUM_SCALAR >::neutralElt_()
const {
59 template <
typename GUM_SCALAR >
60 INLINE Idx Forall< GUM_SCALAR >::fold_(
const DiscreteVariable& v,
63 bool& stop_iteration)
const {
67 stop_iteration =
true;
72 template <
typename GUM_SCALAR >
76 Forall< GUM_SCALAR >::aggregatorName()
const {
78 ss <<
"forall[" << _value_ <<
"]";
82 template <
typename GUM_SCALAR >
83 INLINE MultiDimContainer< GUM_SCALAR >* Forall< GUM_SCALAR >::newFactory()
const {
84 return new Forall< GUM_SCALAR >(_value_);