aGrUM  0.16.0
max_tpl.h
Go to the documentation of this file.
1 
30 // to ease parser in IDEs
32 
33 namespace gum {
34 
35  namespace aggregator {
36  template < typename GUM_SCALAR >
37  INLINE Max< GUM_SCALAR >::Max() : MultiDimAggregator< GUM_SCALAR >() {
38  GUM_CONSTRUCTOR(Max);
39  }
40 
41  template < typename GUM_SCALAR >
43  MultiDimAggregator< GUM_SCALAR >(from) {
44  GUM_CONS_CPY(Max);
45  }
46 
47  template < typename GUM_SCALAR >
49  GUM_DESTRUCTOR(Max);
50  }
51 
52  template < typename GUM_SCALAR >
54  return (Idx)0;
55  }
56 
57  template < typename GUM_SCALAR >
59  Idx i1,
60  Idx i2,
61  bool& stop_iteration) const {
62  return (i1 > i2) ? i1 : i2;
63  }
64 
65  template < typename GUM_SCALAR >
66  INLINE std::string Max< GUM_SCALAR >::aggregatorName() const {
67  return "max";
68  }
69 
70  template < typename GUM_SCALAR >
72  return new Max< GUM_SCALAR >;
73  }
74 
75  } // namespace aggregator
76 } // namespace gum
virtual Idx _fold(const DiscreteVariable &v, Idx i1, Idx i2, bool &stop_iteration) const
_fold is applied on value i1 for variable v. the actual result for precedent applications is i2...
Definition: max_tpl.h:58
virtual Idx _neutralElt() const
_neutralElt() is the result value for the first application of _fold
Definition: max_tpl.h:53
virtual ~Max()
Definition: max_tpl.h:48
Base class for discrete random variable.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
Abstract base class for all multi dimensionnal containers.
virtual MultiDimContainer< GUM_SCALAR > * newFactory() const
This method creates a clone of this object, withouth its content (including variable), you must use this method if you want to ensure that the generated object has the same type than the object containing the called newFactory()
Definition: max_tpl.h:71
<agrum/multidim/aggregators/multiDimAggregator.h>
virtual std::string aggregatorName() const
Definition: max_tpl.h:66
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size Idx
Type for indexes.
Definition: types.h:53
max aggregator
Definition: max.h:54