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