|
stmm-games-doc
0.32.0
|
Smallish set of integers. More...
Public Member Functions | |
| IntSet () noexcept | |
| Constructs empty integer set. More... | |
| IntSet (int32_t nValue) noexcept | |
| Constructs integer set with one value. More... | |
| IntSet (int32_t nFromValue, int32_t nToValue) noexcept | |
| Constructs integer set with ordered value range. More... | |
| IntSet (int32_t nFromValue, int32_t nToValue, int32_t nStep) noexcept | |
| Constructs integer set with ordered stepped value range. More... | |
| IntSet (const std::vector< int32_t > &aValues) noexcept | |
| Constructs integer set with array of unsorted values. More... | |
| IntSet (const std::vector< int32_t > &aValues, bool bIsSorted) noexcept | |
| Constructs integer set with array of values. More... | |
| IntSet (std::vector< int32_t > &&aValues) noexcept | |
| Constructs integer set with array of unsorted values. More... | |
| IntSet (std::vector< int32_t > &&aValues, bool bIsSorted) noexcept | |
| Constructs integer set with array of values. More... | |
| IntSet (const IntSet &oSource) noexcept | |
| IntSet (IntSet &&oSource) noexcept | |
| IntSet & | operator= (const IntSet &oSource) noexcept |
| IntSet & | operator= (IntSet &&oSource) noexcept |
| int32_t | size () const noexcept |
| The size of the integer set. More... | |
| int32_t | getValueByIndex (int32_t nIdx) const noexcept |
| The value at a given index. More... | |
| int32_t | getIndexOfValue (int32_t nValue) const noexcept |
| The index of the value. More... | |
| std::vector< int32_t > | getAsVector () const noexcept |
| Get as vector of ordered unique values. More... | |
| void | dump (int32_t nIndentSpaces, bool bHeader) const noexcept |
Static Public Member Functions | |
| static IntSet | makeUnion (const IntSet &oSetL, const IntSet &oSetR) noexcept |
| Union of two IntSet. More... | |
| static IntSet | makeIntersection (const IntSet &oSetL, const IntSet &oSetR) noexcept |
| Intersection of two IntSet. More... | |
| static IntSet | makeDifference (const IntSet &oSet, const IntSet &oSetExcl) noexcept |
| Difference of two IntSet. More... | |
Smallish set of integers.
|
inlinenoexcept |
Constructs empty integer set.
|
inlineexplicitnoexcept |
Constructs integer set with one value.
| nValue | The value. |
|
noexcept |
Constructs integer set with ordered value range.
Value at index 0 is nFromValue, the last is nToValue. Parameter nFromValue can be > nToValue.
| nFromValue | The start value. |
| nToValue | The end value. |
|
noexcept |
Constructs integer set with ordered stepped value range.
Value at index 0 is nFromValue, value at index 1 is nFromValue + nStep provided it isn't past nToValue, etc.
Parameter nStep can only be 0 if nFromValue == nToValue.
| nFromValue | The start value. |
| nToValue | The end value. |
| nStep | The step between generated values. Can be < 0. |
|
explicitnoexcept |
Constructs integer set with array of unsorted values.
If values are repeated they are ignored.
| aValues | The values. |
|
explicitnoexcept |
Constructs integer set with array of values.
If values are repeated they are ignored.
| aValues | The values. |
| bIsSorted | Whether the values are already sorted. |
|
explicitnoexcept |
Constructs integer set with array of unsorted values.
If values are repeated they are ignored.
| aValues | The values. |
|
explicitnoexcept |
Constructs integer set with array of values.
If values are repeated they are ignored.
| aValues | The values. |
| bIsSorted | Whether the values are already sorted. |
|
inlinenoexcept |
|
inlinenoexcept |
|
noexcept |
|
noexcept |
Get as vector of ordered unique values.
Be aware that if size() is a big number, this function might terminate the program because of out of memory exception.
|
noexcept |
The index of the value.
| nValue | The value to look for. |
|
noexcept |
|
staticnoexcept |
Difference of two IntSet.
| oSet | The main int set. |
| oSetExcl | The set the values of which should not appear in the result. |
|
noexcept |
The size of the integer set.
1.8.13