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
>
35
#include <
agrum/core/multiPriorityQueue.h
>
36
#include <
agrum/core/sequence.h
>
37
// =========================================================================
38
#include <
agrum/graphs/graphElements.h
>
39
#include <
agrum/graphs/parts/nodeGraphPart.h
>
40
// =========================================================================
41
#include <
agrum/multidim/utils/FunctionGraphUtilities/link.h
>
42
// =========================================================================
43
#include <
agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h
>
44
#include <
agrum/FMDP/learning/datastructure/leaves/concreteLeaf.h
>
45
#include <
agrum/FMDP/learning/datastructure/leaves/fusionContext.h
>
46
#include <
agrum/FMDP/learning/datastructure/leaves/leafPair.h
>
47
// =========================================================================
48
49
namespace
gum
{
50
60
class
LeafAggregator
{
61
public
:
62
// ==========================================================================
64
// ==========================================================================
66
67
// ###################################################################
69
// ###################################################################
70
LeafAggregator
(
NodeGraphPart
* idSource,
double
similarityThreshold);
71
72
// ###################################################################
74
// ###################################################################
75
~LeafAggregator
();
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
127
HashTable< NodeId, AbstractLeaf* >
leavesMap
();
128
129
std::string
toString
();
130
131
private
:
132
void
__removeContext
(
Idx
);
133
void
__addInitialPair
(
LeafPair
*);
134
void
__updateInitialPair
(
LeafPair
*);
135
void
__removeInitialPair
(
LeafPair
*);
136
137
Sequence< FusionContext< false >
* >
__fusionSeq
;
138
139
FusionContext< true >
*
__initialContext
;
140
141
HashTable< AbstractLeaf*, Set< LeafPair* >
* >
__leaf2Pair
;
142
143
NodeGraphPart
*
__leavesCpt
;
144
145
double
__similarityThreshold
;
146
bool
__needsUpdate
;
147
};
148
149
150
}
/* namespace gum */
151
152
153
#endif // GUM_LEAF_AGGREGATOR_H
gum::LeafAggregator::begin
void begin()
nodeGraphPart.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
multiPriorityQueue.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
abstractLeaf.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::LeafAggregator::__removeInitialPair
void __removeInitialPair(LeafPair *)
Definition:
leafAggregator.cpp:379
sequence.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::FusionContext< true >
gum::LeafAggregator::toString
std::string toString()
Definition:
leafAggregator.cpp:326
gum::LeafAggregator
<agrum/FMDP/learning/FunctionGraph/leafAggregator.h>
Definition:
leafAggregator.h:60
gum::Sequence
The generic class for storing (ordered) sequences of objects.
Definition:
sequence.h:1022
gum::AbstractLeaf
<agrum/FMDP/learning/datastructure/leaves/abstractLeaf.h>
Definition:
abstractLeaf.h:53
gum::LeafPair
<agrum/FMDP/learning/datastructure/leaves/leafPair.h>
Definition:
leafPair.h:51
gum::LeafAggregator::__needsUpdate
bool __needsUpdate
Definition:
leafAggregator.h:146
gum::LeafAggregator::hasNext
bool hasNext()
gum::LeafAggregator::next
double next()
gum::LeafAggregator::__leavesCpt
NodeGraphPart * __leavesCpt
Definition:
leafAggregator.h:143
gum::LeafAggregator::__addInitialPair
void __addInitialPair(LeafPair *)
Definition:
leafAggregator.cpp:362
gum
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition:
agrum.h:25
gum::HashTable
The class for generic Hash Tables.
Definition:
hashTable.h:679
gum::LeafAggregator::update
void update()
Definition:
leafAggregator.cpp:252
gum::LeafAggregator::~LeafAggregator
~LeafAggregator()
Default destructor.
Definition:
leafAggregator.cpp:55
gum::LeafAggregator::__fusionSeq
Sequence< FusionContext< false > *> __fusionSeq
Definition:
leafAggregator.h:137
gum::LeafAggregator::needsUpdate
bool needsUpdate()
Definition:
leafAggregator.h:125
concreteLeaf.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::LeafAggregator::LeafAggregator
LeafAggregator(NodeGraphPart *idSource, double similarityThreshold)
Default constructor.
Definition:
leafAggregator.cpp:43
gum::NodeGraphPart
Class for node sets in graph.
Definition:
nodeGraphPart.h:256
gum::LeafAggregator::leavesMap
HashTable< NodeId, AbstractLeaf *> leavesMap()
Definition:
leafAggregator.cpp:288
gum::LeafAggregator::__initialContext
FusionContext< true > * __initialContext
Definition:
leafAggregator.h:139
gum::LeafAggregator::__leaf2Pair
HashTable< AbstractLeaf *, Set< LeafPair *> *> __leaf2Pair
Definition:
leafAggregator.h:141
gum::Idx
Size Idx
Type for indexes.
Definition:
types.h:53
gum::LeafAggregator::removeLeaf
void removeLeaf(AbstractLeaf *)
Definition:
leafAggregator.cpp:195
link.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
leafPair.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::LeafAggregator::__similarityThreshold
double __similarityThreshold
Definition:
leafAggregator.h:145
gum::LeafAggregator::updateLeaf
bool updateLeaf(AbstractLeaf *)
Definition:
leafAggregator.cpp:145
gum::LeafAggregator::__removeContext
void __removeContext(Idx)
Definition:
leafAggregator.cpp:347
fusionContext.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::LeafAggregator::addLeaf
void addLeaf(AbstractLeaf *)
Definition:
leafAggregator.cpp:86
hashTable.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
graphElements.h
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
gum::LeafAggregator::__updateInitialPair
void __updateInitialPair(LeafPair *)
Definition:
leafAggregator.cpp:371