| 55 |
|
/** */ |
| 56 |
|
BitSet() {} |
| 57 |
|
/** */ |
| 58 |
< |
BitSet(int nbits) { bitset_.resize(nbits); } |
| 58 |
> |
BitSet(int nbits) : bitset_(nbits) {clearAll(); } |
| 59 |
|
|
| 60 |
|
/** Returns the number of bits set to true in this BitSet. */ |
| 61 |
|
int countBits(); |
| 105 |
|
void setRangeOff(int fromIndex, int toIndex) { setBits(fromIndex, toIndex, false); } |
| 106 |
|
|
| 107 |
|
/** Sets all of the bits in this BitSet to false. */ |
| 108 |
< |
void clear() { setRangeOff(0, size()); } |
| 108 |
> |
void clearAll() { setRangeOff(0, size()); } |
| 109 |
> |
|
| 110 |
> |
void setAll() { setRangeOn(0, size()); } |
| 111 |
|
|
| 112 |
|
/** Returns the number of bits of space actually in use by this BitSet to represent bit values. */ |
| 113 |
|
int size() const { return bitset_.size(); } |
| 114 |
|
|
| 115 |
|
/** Changes the size of BitSet*/ |
| 116 |
< |
void resize(int nbits) { bitset_.resize(nbits); } |
| 116 |
> |
void resize(int nbits); |
| 117 |
|
|
| 118 |
|
BitSet& operator&= (const BitSet &bs) { andOperator (bs); return *this; } |
| 119 |
|
BitSet& operator|= (const BitSet &bs) { orOperator (bs); return *this; } |