Data Structures |
| class | Iterator |
| | Random iterator in the range. More...
|
Public Member Functions |
|
constexpr | IntRange () |
| | Construct an empty range.
|
|
constexpr | IntRange (T first, S size) |
| | Construct a range in the specified bounds.
|
| constexpr T | First () const |
| constexpr T | Base () const |
| constexpr T | End () const |
| constexpr S | Size () const |
| constexpr bool | IsEmpty () const |
| constexpr bool | Contains (T value) const |
| constexpr bool | Contains (const IntRange< T, S > &other) const |
| constexpr bool | Overlaps (const IntRange< T, S > &other) const |
|
IntRange & | SetFirst (T first) |
| | Set origin, retain size of the range.
|
|
IntRange & | SetSize (S size) |
| | Set size, retain origin of the range.
|
|
IntRange & | Include (T value) |
| | If needed, extend boundaries of this range to include the specified value.
|
|
IntRange & | Include (const IntRange< T, S > &other) |
| | If needed, extend boundaries of this range to include the specified 'other' range.
|
|
IntRange & | Intersect (const IntRange< T, S > &other) |
| | Intersect this range with the specified 'other' range.
|
template<typename T, typename S = size_t>
class gtpin::IntRange< T, S >
Iterable range of integral values.
- Parameters:
-
| T | type of the value |
| S | type of the range size |