![]() |
aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/learning/FunctionGraph/leafAggregator.h> More...
#include <leafAggregator.h>
Public Member Functions | |
| void | update () |
| bool | needsUpdate () |
| HashTable< NodeId, AbstractLeaf * > | leavesMap () |
| std::string | toString () |
Constructor & destructor. | |
| LeafAggregator (NodeGraphPart *idSource, double similarityThreshold) | |
| Default constructor. | |
| ~LeafAggregator () | |
| Default destructor. | |
Leaf Handling methods | |
| void | addLeaf (AbstractLeaf *) |
| bool | updateLeaf (AbstractLeaf *) |
| void | removeLeaf (AbstractLeaf *) |
| void | begin () |
| bool | hasNext () |
| double | next () |
Private Member Functions | |
| void | _removeContext_ (Idx) |
| void | _addInitialPair_ (LeafPair *) |
| void | _updateInitialPair_ (LeafPair *) |
| void | _removeInitialPair_ (LeafPair *) |
Private Attributes | |
| Sequence< FusionContext< false > * > | _fusionSeq_ |
| FusionContext< true > * | _initialContext_ |
| HashTable< AbstractLeaf *, Set< LeafPair * > * > | _leaf2Pair_ |
| NodeGraphPart * | _leavesCpt_ |
| double | _similarityThreshold_ |
| bool | _needsUpdate_ |
<agrum/FMDP/learning/FunctionGraph/leafAggregator.h>
Gather together leaves with similar distributions
Definition at line 72 of file leafAggregator.h.
| gum::LeafAggregator::LeafAggregator | ( | NodeGraphPart * | idSource, |
| double | similarityThreshold ) |
Default constructor.
Definition at line 65 of file leafAggregator.cpp.
References LeafAggregator(), _initialContext_, _leavesCpt_, _needsUpdate_, and _similarityThreshold_.
Referenced by LeafAggregator(), and ~LeafAggregator().
| gum::LeafAggregator::~LeafAggregator | ( | ) |
Default destructor.
Definition at line 75 of file leafAggregator.cpp.
References LeafAggregator(), _initialContext_, _leaf2Pair_, _removeContext_(), and gum::LeafPair::otherLeaf().
|
private |
Definition at line 358 of file leafAggregator.cpp.
References _initialContext_, and _removeContext_().
Referenced by addLeaf().
|
private |
Definition at line 345 of file leafAggregator.cpp.
References _fusionSeq_, _leavesCpt_, and _needsUpdate_.
Referenced by ~LeafAggregator(), _addInitialPair_(), _removeInitialPair_(), _updateInitialPair_(), addLeaf(), removeLeaf(), and updateLeaf().
|
private |
Definition at line 374 of file leafAggregator.cpp.
References _initialContext_, and _removeContext_().
Referenced by removeLeaf().
|
private |
Definition at line 366 of file leafAggregator.cpp.
References _initialContext_, and _removeContext_().
Referenced by updateLeaf().
| void gum::LeafAggregator::addLeaf | ( | AbstractLeaf * | l | ) |
Definition at line 106 of file leafAggregator.cpp.
References _addInitialPair_(), _fusionSeq_, _leaf2Pair_, _needsUpdate_, _removeContext_(), gum::Set< Key >::beginSafe(), gum::Set< Key >::endSafe(), gum::Set< Key >::insert(), and gum::LeafPair::updateLikelyhood().
| void gum::LeafAggregator::begin | ( | ) |
| bool gum::LeafAggregator::hasNext | ( | ) |
| HashTable< NodeId, AbstractLeaf * > gum::LeafAggregator::leavesMap | ( | ) |
Definition at line 292 of file leafAggregator.cpp.
References _fusionSeq_, _leaf2Pair_, gum::HashTable< Key, Val >::beginSafe(), gum::HashTable< Key, Val >::endSafe(), gum::HashTable< Key, Val >::exists(), and gum::HashTable< Key, Val >::insert().
|
inline |
| double gum::LeafAggregator::next | ( | ) |
| void gum::LeafAggregator::removeLeaf | ( | AbstractLeaf * | l | ) |
Definition at line 206 of file leafAggregator.cpp.
References _fusionSeq_, _leaf2Pair_, _needsUpdate_, _removeContext_(), _removeInitialPair_(), gum::Set< Key >::beginSafe(), and gum::Set< Key >::endSafe().
| std::string gum::LeafAggregator::toString | ( | ) |
Definition at line 325 of file leafAggregator.cpp.
References _fusionSeq_, and _initialContext_.
| void gum::LeafAggregator::update | ( | ) |
Definition at line 257 of file leafAggregator.cpp.
References _fusionSeq_, _initialContext_, _leavesCpt_, _needsUpdate_, _similarityThreshold_, gum::FusionContext< isInitial >::addPair(), gum::FusionContext< isInitial >::associateLeaf(), gum::AbstractLeaf::contains(), gum::FusionContext< isInitial >::containsAssociatedLeaf(), gum::LeafPair::convert2Leaf(), and gum::LeafPair::likelyhood().
| bool gum::LeafAggregator::updateLeaf | ( | AbstractLeaf * | l | ) |
Definition at line 162 of file leafAggregator.cpp.
References _fusionSeq_, _leaf2Pair_, _needsUpdate_, _removeContext_(), _updateInitialPair_(), gum::Set< Key >::beginSafe(), gum::Set< Key >::clear(), gum::Set< Key >::endSafe(), and gum::AbstractLeaf::id().
|
private |
Definition at line 149 of file leafAggregator.h.
Referenced by _removeContext_(), addLeaf(), leavesMap(), removeLeaf(), toString(), update(), and updateLeaf().
|
private |
Definition at line 151 of file leafAggregator.h.
Referenced by LeafAggregator(), ~LeafAggregator(), _addInitialPair_(), _removeInitialPair_(), _updateInitialPair_(), toString(), and update().
|
private |
Definition at line 153 of file leafAggregator.h.
Referenced by ~LeafAggregator(), addLeaf(), leavesMap(), removeLeaf(), and updateLeaf().
|
private |
Definition at line 155 of file leafAggregator.h.
Referenced by LeafAggregator(), _removeContext_(), and update().
|
private |
Definition at line 158 of file leafAggregator.h.
Referenced by LeafAggregator(), _removeContext_(), addLeaf(), needsUpdate(), removeLeaf(), update(), and updateLeaf().
|
private |
Definition at line 157 of file leafAggregator.h.
Referenced by LeafAggregator(), and update().