![]() |
aGrUM 3.0.0
a C++ library for (probabilistic) graphical models
|
<agrum/FMDP/planning/FunctionGraph/variableselector.h> More...
#include <variableselector.h>
Public Member Functions | |
Constructor & destructor. | |
| VariableSelector (const gum::VariableSet &startingSet) | |
| Default constructor. | |
| ~VariableSelector () | |
| Default destructor. | |
| gum::VariableSet | _remainingVars_ |
| The set of remaining vars to select among. | |
| SetIteratorSafe< const DiscreteVariable * > | _rvi_ |
| The set of remaining vars to select among. | |
| MultiPriorityQueue< double, double, std::greater< double > > | _remainingScores_ |
| Heap keeping best score on top for immediate access. | |
| HashTable< double, gum::VariableSet * > | _remainingVarsByScore_ |
| HashTable associating to each score the set of variable having that score. | |
| HashTable< const DiscreteVariable *, double > | _remainingVarsScore_ |
| HashTable associating to each variable its score. | |
| HashTable< const DiscreteVariable *, double > | _remainingVarsOtherScore_ |
| HashTable associating to each variable its 2nd score. | |
| void | updateScore (const DiscreteVariable *var, double score, double secondaryscore) |
| The set of remaining vars to select among. | |
| void | downdateScore (const DiscreteVariable *var, double score, double secondaryscore) |
| The set of remaining vars to select among. | |
| const DiscreteVariable * | select () |
| Select the most relevant variable. | |
| bool | isEmpty () const |
| The set of remaining vars to select among. | |
| void | begin () |
| The set of remaining vars to select among. | |
| bool | hasNext () const |
| The set of remaining vars to select among. | |
| void | next () |
| The set of remaining vars to select among. | |
| const DiscreteVariable * | current () const |
| The set of remaining vars to select among. | |
| void | _addVar_ (const DiscreteVariable *var) |
| The set of remaining vars to select among. | |
| void | _removeVar_ (const DiscreteVariable *var) |
| The set of remaining vars to select among. | |
<agrum/FMDP/planning/FunctionGraph/variableselector.h>
Definition at line 71 of file variableselector.h.
|
explicit |
Default constructor.
Definition at line 66 of file variableselector.cpp.
References VariableSelector(), _remainingScores_, _remainingVars_, _remainingVarsByScore_, _remainingVarsOtherScore_, and _remainingVarsScore_.
Referenced by VariableSelector(), and ~VariableSelector().
| gum::VariableSelector::~VariableSelector | ( | ) |
Default destructor.
Definition at line 82 of file variableselector.cpp.
References VariableSelector().
|
private |
The set of remaining vars to select among.
Definition at line 131 of file variableselector.cpp.
References _remainingScores_, _remainingVarsByScore_, and _remainingVarsScore_.
Referenced by downdateScore(), and updateScore().
|
private |
The set of remaining vars to select among.
Definition at line 144 of file variableselector.cpp.
References _remainingScores_, _remainingVarsByScore_, _remainingVarsScore_, and gum::Set< Key >::empty().
Referenced by downdateScore(), select(), and updateScore().
| INLINE void gum::VariableSelector::begin | ( | ) |
The set of remaining vars to select among.
Definition at line 50 of file variableselector_inl.h.
References _remainingVars_, and _rvi_.
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_updateNodeSet_(), and gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| INLINE const DiscreteVariable * gum::VariableSelector::current | ( | ) | const |
The set of remaining vars to select among.
Definition at line 56 of file variableselector_inl.h.
References _rvi_.
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_updateNodeSet_(), and gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| void gum::VariableSelector::downdateScore | ( | const DiscreteVariable * | var, |
| double | score, | ||
| double | secondaryscore ) |
The set of remaining vars to select among.
Definition at line 99 of file variableselector.cpp.
References _addVar_(), _remainingVarsOtherScore_, _remainingVarsScore_, and _removeVar_().
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_downdateScore_().
| INLINE bool gum::VariableSelector::hasNext | ( | ) | const |
The set of remaining vars to select among.
Definition at line 52 of file variableselector_inl.h.
References _remainingVars_, and _rvi_.
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_updateNodeSet_(), and gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| INLINE bool gum::VariableSelector::isEmpty | ( | ) | const |
The set of remaining vars to select among.
Definition at line 48 of file variableselector_inl.h.
References _remainingVars_.
Referenced by gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| INLINE void gum::VariableSelector::next | ( | ) |
The set of remaining vars to select among.
Definition at line 54 of file variableselector_inl.h.
References _rvi_.
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_updateNodeSet_(), and gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| const DiscreteVariable * gum::VariableSelector::select | ( | ) |
Select the most relevant variable.
Definition at line 111 of file variableselector.cpp.
References _remainingScores_, _remainingVars_, _remainingVarsByScore_, _remainingVarsOtherScore_, _removeVar_(), gum::Set< Key >::beginSafe(), gum::DiscreteVariable::domainSize(), and gum::Set< Key >::endSafe().
Referenced by gum::IMDDI< AttributeSelection, isScalar >::updateGraph().
| void gum::VariableSelector::updateScore | ( | const DiscreteVariable * | var, |
| double | score, | ||
| double | secondaryscore ) |
The set of remaining vars to select among.
Definition at line 87 of file variableselector.cpp.
References _addVar_(), _remainingVarsOtherScore_, _remainingVarsScore_, and _removeVar_().
Referenced by gum::IMDDI< AttributeSelection, isScalar >::_updateScore_().
|
private |
Heap keeping best score on top for immediate access.
Definition at line 126 of file variableselector.h.
Referenced by VariableSelector(), _addVar_(), _removeVar_(), and select().
|
private |
The set of remaining vars to select among.
Definition at line 122 of file variableselector.h.
Referenced by VariableSelector(), begin(), hasNext(), isEmpty(), and select().
|
private |
HashTable associating to each score the set of variable having that score.
Definition at line 130 of file variableselector.h.
Referenced by VariableSelector(), _addVar_(), _removeVar_(), and select().
|
private |
HashTable associating to each variable its 2nd score.
Definition at line 136 of file variableselector.h.
Referenced by VariableSelector(), downdateScore(), select(), and updateScore().
|
private |
HashTable associating to each variable its score.
Definition at line 133 of file variableselector.h.
Referenced by VariableSelector(), _addVar_(), _removeVar_(), downdateScore(), and updateScore().
|
private |