38 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
47 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
49 const GUM_SCALAR_VAL& val,
const GUM_SCALAR_SEQ& elem) {
59 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
64 this->operator+=(src);
68 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
72 this->__argMaxSeq->clear();
73 this->operator+=(src);
81 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
94 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
98 __argMaxSeq->insert(elem);
105 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
110 if (!__argMaxSeq->exists(*iter)) __argMaxSeq->insert(*iter);
117 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
120 if (__val != compared.
value())
return false;
122 if (!__argMaxSeq->exists(*iter))
return false;
123 for (
auto iter = this->beginSafe(); iter != this->endSafe(); ++iter)
124 if (!compared.
exists(*iter))
return false;
SequenceIteratorSafe< GUM_SCALAR_SEQ > endSafe() const
Iterator end.
bool operator==(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Compares two ArgMaxSet to check if they are equals.
gum is the global namespace for all aGrUM entities
Class to handle efficiently argMaxSet.
SequenceIteratorSafe< GUM_SCALAR_SEQ > beginSafe() const
Iterator beginning.
const GUM_SCALAR_VAL & value() const
Returns the value on which comparison are made.
bool exists(const GUM_SCALAR_SEQ &elem) const
ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > & operator+=(const GUM_SCALAR_SEQ &elem)
Ajout d'un élément.
This files contains several function objects that are not (yet) defined in the STL.
ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > & operator=(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &src)
Constructor.
void insert(const Key &k)
Insert an element at the end of the sequence.