36 #ifndef GUM_ARG_MAX_SET_H 37 #define GUM_ARG_MAX_SET_H 55 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
72 ArgMaxSet(
const GUM_SCALAR_VAL& val,
const GUM_SCALAR_SEQ& elem);
90 void*
operator new(
size_t s) {
93 void operator delete(
void* p) {
152 return !(*
this == compared);
160 return __val < compared.
value() ? true :
false;
164 return compared < *
this;
168 return !(*
this > compared);
172 return !(*
this < compared);
187 bool exists(
const GUM_SCALAR_SEQ& elem)
const {
198 streamy <<
"Value : " << objy.
value()
SequenceIteratorSafe< GUM_SCALAR_SEQ > endSafe() const
Iterator end.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
const iterator_safe & endSafe() const noexcept
Returns the safe end iterator.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
bool operator==(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Compares two ArgMaxSet to check if they are equals.
Size size() const noexcept
Returns the size of the sequence.
std::string toString() const
Displays the content of the sequence.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Class to handle efficiently argMaxSet.
iterator_safe beginSafe() const
Returns a safe begin iterator.
bool operator<(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Checks if val is lower or higher from the compared ArgMaxSet val.
bool operator<=(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Ajout d'un élément.
bool operator!=(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Ajout d'un élément.
bool exists(const Key &k) const
Check the existence of k in the sequence.
bool operator>(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Ajout d'un élément.
Sequence< GUM_SCALAR_SEQ > * __argMaxSeq
The very bone of the ArgMaxSet.
friend std::ostream & operator<<(std::ostream &streamy, const ArgMaxSet &objy)
SequenceIteratorSafe< GUM_SCALAR_SEQ > beginSafe() const
Iterator beginning.
const GUM_SCALAR_VAL & value() const
Returns the value on which comparison are made.
void deallocate(void *pDeallocatedObject, const size_t &objectSize)
Deallocates an object.
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.
ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > & operator=(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &src)
Constructor.
Size Idx
Type for indexes.
Idx size() const
Gives the size.
void * allocate(const size_t &objectSize)
Allocates a block.
bool operator>=(const ArgMaxSet< GUM_SCALAR_VAL, GUM_SCALAR_SEQ > &compared) const
Ajout d'un élément.
static SmallObjectAllocator & instance()
const GUM_SCALAR_SEQ & operator[](const Idx i) const
Gives the ith element.
const Key & atPos(Idx i) const
Returns the object at the pos i.