aGrUM  0.16.0
count.h
Go to the documentation of this file.
1 
30 #ifndef GUM_COUNT_AGGREGATOR_H
31 #define GUM_COUNT_AGGREGATOR_H
32 
34 
35 namespace gum {
36 
37  namespace aggregator {
38  // =========================================================================
39  // === GUM_MAX_AGGREGATOR ===
40  // =========================================================================
41 
56  template < typename GUM_SCALAR >
57  class Count : public MultiDimAggregator< GUM_SCALAR > {
58  public:
59  Count(Idx value);
60  Count(const Count< GUM_SCALAR >& from);
61  virtual ~Count();
62 
63  virtual std::string aggregatorName() const;
64 
83 
84  protected:
85  virtual Idx _neutralElt() const;
86  virtual Idx _fold(const DiscreteVariable& v,
87  Idx i1,
88  Idx i2,
89  bool& stop_iteration) const;
90 
91  private:
93  };
94 
95 
96 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
97  extern template class Count< double >;
98 #endif
99 
100 
101  } // namespace aggregator
102 } // namespace gum
103 
105 
106 #endif // GUM_COUNT_AGGREGATOR_H
virtual Idx _neutralElt() const
_neutralElt() is the result value for the first application of _fold
Definition: count_tpl.h:55
virtual std::string aggregatorName() const
Definition: count_tpl.h:68
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
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: count_tpl.h:60
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.
<agrum/multidim/aggregators/multiDimAggregator.h>
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: count_tpl.h:76
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Size Idx
Type for indexes.
Definition: types.h:53
count aggregator
Definition: count.h:57