aGrUM  0.14.2
leafAggregator.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
27 // =========================================================================
28 #ifndef GUM_LEAF_AGGREGATOR_H
29 #define GUM_LEAF_AGGREGATOR_H
30 // =========================================================================
31 #include <agrum/core/hashTable.h>
33 #include <agrum/core/sequence.h>
34 // =========================================================================
37 // =========================================================================
39 // =========================================================================
44 // =========================================================================
45 
46 namespace gum {
47 
58  public:
59  // ==========================================================================
61  // ==========================================================================
63 
64  // ###################################################################
66  // ###################################################################
67  LeafAggregator(NodeGraphPart* idSource, double similarityThreshold);
68 
69  // ###################################################################
71  // ###################################################################
73 
75 
76  // ==========================================================================
78  // ==========================================================================
80 
81  // ###################################################################
83  // ###################################################################
84  void addLeaf(AbstractLeaf*);
85 
86  // ###################################################################
88  // ###################################################################
89  bool updateLeaf(AbstractLeaf*);
90 
91  // ###################################################################
93  // ###################################################################
94  void removeLeaf(AbstractLeaf*);
95 
97 
98  // ==========================================================================
100  // ==========================================================================
102 
103  // ###################################################################
105  // ###################################################################
106  void begin();
107 
108  // ###################################################################
110  // ###################################################################
111  bool hasNext();
112 
113  // ###################################################################
115  // ###################################################################
116  double next();
117 
119 
120  void update();
121 
122  bool needsUpdate() { return __needsUpdate; }
123 
125 
126  std::string toString();
127 
128  private:
129  void __removeContext(Idx);
130  void __addInitialPair(LeafPair*);
133 
135 
137 
139 
141 
144  };
145 
146 
147 } /* namespace gum */
148 
149 
150 #endif // GUM_LEAF_AGGREGATOR_H
Base node set class for graphs.
Priority queues in which the same element can appear several times.
Headers of the abstract Leaf class.
void __removeInitialPair(LeafPair *)
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
std::string toString()
<agrum/FMDP/learning/FunctionGraph/leafAggregator.h>
The generic class for storing (ordered) sequences of objects.
Definition: sequence.h:1019
<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h>
Definition: abstractLeaf.h:50
<agrum/FMDP/learning/datastructure/leaves/leafPair.h>
Definition: leafPair.h:48
NodeGraphPart * __leavesCpt
void __addInitialPair(LeafPair *)
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
The class for generic Hash Tables.
Definition: hashTable.h:676
~LeafAggregator()
Default destructor.
Sequence< FusionContext< false > *> __fusionSeq
Headers of the Concrete Leaf class.
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:50
void removeLeaf(AbstractLeaf *)
Headers of the leaf pair class.
bool updateLeaf(AbstractLeaf *)
Headers of the Fusion Context class.
void addLeaf(AbstractLeaf *)
Class hash tables iterators.
some utils for topology : NodeId, Edge, Arc and consorts ...
void __updateInitialPair(LeafPair *)