LevelS C++ support library
3.83
|
#include <crangeset.h>
Public Member Functions | |
tdiff | iiv (const T &val) const |
void | clear () |
void | append (const T &v1, const T &v2) |
void | append (const T &v) |
void | append (const crangeset &other) |
T | nval () const |
bool | operator== (const crangeset &other) const |
bool | contains (T a, T b) const |
bool | contains (T v) const |
bool | contains (const crangeset &other) const |
bool | overlaps (T a, T b) const |
bool | overlaps (const crangeset &other) const |
Static Public Member Functions | |
static int | strategy (tsize sza, tsize szb) |
Class for storing sets of ranges of integer numbers T must be a signed integer type, but all numbers entered into the range set must be nonnegative!
Definition at line 76 of file crangeset.h.
Returns the index of the last number in r
whose absolute value is <= val If val is smaller than all absolute values in r
, returns -1.
Definition at line 214 of file crangeset.h.
Estimate a good strategy for set operations involving two rangesets.
Definition at line 221 of file crangeset.h.
|
inline |
Removes all rangeset entries.
Definition at line 380 of file crangeset.h.
|
inline |
Appends [v1;v2[ to the rangeset. v1 must be larger than the minimum of the last range in the rangeset.
Definition at line 398 of file crangeset.h.
|
inline |
Appends [v;v+1[ to the rangeset. v must be larger than the minimum of the last range in the rangeset.
Definition at line 434 of file crangeset.h.
Appends other to the rangeset. All values in other must be larger than the minimum of the last range in the rangeset.
Definition at line 439 of file crangeset.h.
|
inline |
Returns the total number of elements in the rangeset.
Definition at line 449 of file crangeset.h.
Returns true if the rangeset is identical to other, else false.
Definition at line 469 of file crangeset.h.
|
inline |
Returns true if the rangeset contains all values in the range [a;b[, else false.
Definition at line 474 of file crangeset.h.
|
inline |
Returns true if the rangeset contains the value v, else false.
Definition at line 491 of file crangeset.h.
Returns true if the rangeset contains all values stored in other, else false.
Definition at line 507 of file crangeset.h.
|
inline |
Returns true if any of the numbers [a;b[ are contained in the set, else false.
Definition at line 512 of file crangeset.h.
Returns true if there is overlap between the set and "other", else false.
Definition at line 532 of file crangeset.h.