30 #ifndef GUM_VARIABLE_SELECTOR_H 31 #define GUM_VARIABLE_SELECTOR_H 33 #include <agrum/tools/core/multiPriorityQueue.h> 34 #include <agrum/tools/core/set.h> 36 #include <agrum/tools/variables/discreteVariable.h> 78 void updateScore(
const DiscreteVariable* var,
double score,
double secondaryscore);
79 void downdateScore(
const DiscreteVariable* var,
double score,
double secondaryscore);
87 bool isEmpty() {
return _remainingVars_.empty(); }
89 void begin() { _rvi_ = _remainingVars_.beginSafe(); }
90 bool hasNext() {
return _rvi_ != _remainingVars_.endSafe(); }
95 void _addVar_(
const DiscreteVariable* var);
INLINE void emplace(Args &&... args)
void downdateScore(const DiscreteVariable *var, double score, double secondaryscore)
The set of remaining vars to select among.
void begin()
The set of remaining vars to select among.
~VariableSelector()
Default destructor.
Set< const DiscreteVariable *> _remainingVars_
The set of remaining vars to select among.
HashTable< const DiscreteVariable *, double > _remainingVarsOtherScore_
HashTable associating to each variable its 2nd score.
bool hasNext()
The set of remaining vars to select among.
const DiscreteVariable * select()
Select the most relevant variable.
HashTable< const DiscreteVariable *, double > _remainingVarsScore_
HashTable associating to each variable its score.
HashTable< double, Set< const DiscreteVariable *> *> _remainingVarsByScore_
HashTable associating to each score the set of variable having that score.
void _removeVar_(const DiscreteVariable *var)
The set of remaining vars to select among.
SetIteratorSafe< const DiscreteVariable *> _rvi_
The set of remaining vars to select among.
bool isEmpty()
The set of remaining vars to select among.
void updateScore(const DiscreteVariable *var, double score, double secondaryscore)
The set of remaining vars to select among.
void next()
The set of remaining vars to select among.
void _addVar_(const DiscreteVariable *var)
The set of remaining vars to select among.
const DiscreteVariable * current()
The set of remaining vars to select among.
VariableSelector(Set< const DiscreteVariable * > &startingSet)
Default constructor.