TF++, Miscellaneous classes and modules in C++:
|
A class to deal with numerical ranges. More...
#include <range.h>
Public Types | |
typedef T | Tvalue |
element type More... | |
Public Member Functions | |
Range () | |
empty range More... | |
Range (const Tvalue &index) | |
range containing exactly one element More... | |
Range (const Tvalue &first, const Tvalue &last) | |
set range More... | |
Tvalue & | first () |
access start of range More... | |
Tvalue & | last () |
access end of range More... | |
const Tvalue & | first () const |
read start of range More... | |
const Tvalue & | last () const |
read end of range More... | |
bool | isinside (const Range &other) const |
is this range inside the other More... | |
bool | contains (const Range &other) const |
does this range contain the other More... | |
bool | contains (const Tvalue &v) const |
does this range contain then value v More... | |
Range & | shrink (const Range &other) |
shrink to smaller of this and the other More... | |
Range & | expand (const Range &other) |
expand to larger of this and the other More... | |
Range & | shift (const Tvalue &n) |
shift by n More... | |
Range & | operator+= (const Tvalue &n) |
shift by n More... | |
Range & | operator-= (const Tvalue &n) |
shift by -n More... | |
Private Attributes | |
Tvalue | Mfirst |
start of range. More... | |
Tvalue | Mlast |
end of range. More... | |
A class to deal with numerical ranges.
T | type of value (default=int) |