aGrUM  0.16.0
leafAggregator.h
Go to the documentation of this file.
1 
30 // =========================================================================
31 #ifndef GUM_LEAF_AGGREGATOR_H
32 #define GUM_LEAF_AGGREGATOR_H
33 // =========================================================================
34 #include <agrum/core/hashTable.h>
36 #include <agrum/core/sequence.h>
37 // =========================================================================
40 // =========================================================================
42 // =========================================================================
47 // =========================================================================
48 
49 namespace gum {
50 
61  public:
62  // ==========================================================================
64  // ==========================================================================
66 
67  // ###################################################################
69  // ###################################################################
70  LeafAggregator(NodeGraphPart* idSource, double similarityThreshold);
71 
72  // ###################################################################
74  // ###################################################################
76 
78 
79  // ==========================================================================
81  // ==========================================================================
83 
84  // ###################################################################
86  // ###################################################################
87  void addLeaf(AbstractLeaf*);
88 
89  // ###################################################################
91  // ###################################################################
92  bool updateLeaf(AbstractLeaf*);
93 
94  // ###################################################################
96  // ###################################################################
97  void removeLeaf(AbstractLeaf*);
98 
100 
101  // ==========================================================================
103  // ==========================================================================
105 
106  // ###################################################################
108  // ###################################################################
109  void begin();
110 
111  // ###################################################################
113  // ###################################################################
114  bool hasNext();
115 
116  // ###################################################################
118  // ###################################################################
119  double next();
120 
122 
123  void update();
124 
125  bool needsUpdate() { return __needsUpdate; }
126 
128 
129  std::string toString();
130 
131  private:
132  void __removeContext(Idx);
133  void __addInitialPair(LeafPair*);
136 
138 
140 
142 
144 
147  };
148 
149 
150 } /* namespace gum */
151 
152 
153 #endif // GUM_LEAF_AGGREGATOR_H
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __removeInitialPair(LeafPair *)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
std::string toString()
<agrum/FMDP/learning/FunctionGraph/leafAggregator.h>
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1022
<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h>
Definition: abstractLeaf.h:53
<agrum/FMDP/learning/datastructure/leaves/leafPair.h>
Definition: leafPair.h:51
NodeGraphPart * __leavesCpt
void __addInitialPair(LeafPair *)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
The class for generic Hash Tables.
Definition: hashTable.h:679
~LeafAggregator()
Default destructor.
Sequence< FusionContext< false > *> __fusionSeq
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
LeafAggregator(NodeGraphPart *idSource, double similarityThreshold)
Default constructor.
Class for node sets in graph.
HashTable< NodeId, AbstractLeaf *> leavesMap()
FusionContext< true > * __initialContext
HashTable< AbstractLeaf *, Set< LeafPair *> *> __leaf2Pair
Size Idx
Type for indexes.
Definition: types.h:53
void removeLeaf(AbstractLeaf *)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool updateLeaf(AbstractLeaf *)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void addLeaf(AbstractLeaf *)
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
void __updateInitialPair(LeafPair *)