#include </home/guntram/tmp/GrAL/sequence/include/Container/integer-range.h>
Public Types | |
|
typedef std::vector < interval_type > ::const_iterator | interval_iterator |
| STL-compliant iterator. | |
Public Member Functions | |
| integer_range () | |
| Construct empty range. | |
| integer_range (INT i) | |
| Construct range of single point. | |
| integer_range (interval_type iv) | |
| Construct range of single interval. | |
| template<class IT > | |
| integer_range (IT b, IT e) | |
| Construct ouf of a range of elements. | |
| bool | empty () const |
| True if no integer is contained. | |
| void | clear () |
| Set to empty range. | |
| interval_iterator | begin_interval () const |
| First interval. | |
| interval_iterator | end_interval () const |
| Past-the-end interval. | |
| element_type | low () const |
| smallest element. The range is contained in [low(), high()] | |
| element_type | high () const |
| largest element. The range is contained in [low(), high()] | |
| const_iterator | begin () const |
| const_iterator | end () const |
| template<class IT > | |
| void | init (IT b, IT e) |
| Initialize range with sequence of elements. | |
| void | push_back (element_type i) |
| Add an element to the range. | |
| bool | contains (INT i) const |
True iff i is contained in an interval. | |
| void | read (std::istream &in) |
This class represents a set of integers, represented as a sequence of closed intervals. It main feature it the ability to read range descriptions like 6,8,10-33,40-100 via operator>>.
Definition at line 36 of file integer-range.h.
| void GrAL::sequence::integer_range< INT >::init | ( | IT | b, | |
| IT | e | |||
| ) | [inline] |
Initialize range with sequence of elements.
The sequence [b,e[ may be unordered and contain duplicates.
Definition at line 153 of file integer-range.h.
References GrAL::sequence::sort_and_make_unique().
Referenced by GrAL::sequence::integer_range< INT >::integer_range().
| void GrAL::sequence::integer_range< INT >::push_back | ( | element_type | i | ) | [inline] |
Add an element to the range.
i > high() Definition at line 104 of file integer-range.h.
References GrAL::sequence::integer_range< INT >::empty(), GrAL::sequence::integer_range< INT >::high(), and REQUIRE.
1.5.8