34 #ifndef GUM_ARG_MAX_SET_H 35 #define GUM_ARG_MAX_SET_H 53 template <
typename GUM_SCALAR_VAL,
typename GUM_SCALAR_SEQ >
70 ArgMaxSet(
const GUM_SCALAR_VAL& val,
const GUM_SCALAR_SEQ& elem);
88 void*
operator new(
size_t s) {
91 void operator delete(
void* p) {
150 return !(*
this == compared);
158 return __val < compared.
value() ? true :
false;
162 return compared < *
this;
166 return !(*
this > compared);
170 return !(*
this < compared);
185 bool exists(
const GUM_SCALAR_SEQ& elem)
const {
196 streamy <<
"Value : " << objy.
value()
SequenceIteratorSafe< GUM_SCALAR_SEQ > endSafe() const
Iterator end.
Headers of gum::SmallObjectAllocator.
const iterator_safe & endSafe() const noexcept
Returns the safe end iterator.
Header file of gum::Sequence, a class for storing (ordered) sequences of objects. ...
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.
gum is the global namespace for all aGrUM entities
Outlined implementation of ArgMaxSet.
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.