43 long _first, _last, _card;
52 void intervalConstructor(
long low,
long high);
60 _first = 0; _last = -1; _card = 0;
65 intervalConstructor(low, high);
71 intervalConstructor(j, j);
81 long first()
const {
return _first; }
84 long last()
const {
return _last; }
87 long next(
long j)
const;
90 long prev(
long j)
const;
93 long card()
const {
return _card; }
96 bool contains(
long j)
const;
99 bool contains(
const IndexSet& s)
const;
102 bool disjointFrom(
const IndexSet& s)
const;
108 bool operator!=(
const IndexSet& s)
const {
109 return !(*
this == s);
152 ostream& operator << (ostream& str,
const IndexSet&
set);
153 istream& operator >> (istream& str,
IndexSet&
set);
158 inline bool empty(
const IndexSet& s) {
return s.
card()==0; }