This class defines a bit vector of fixed length. More...
#include </cur/unifexp/bitvect.h>
Public Member Functions | |
| bitVector (int length) | |
| The constructor of a bit vector of the given size. | |
| ~bitVector () | |
| The destructor. | |
| void | mark (int bit) |
| Marks the given bit. | |
| void | unmark (int bit) |
| Unmarks the given bit. | |
| int | findMarked (int start, int length) const |
| Finds the first marked bit starting at the given position. | |
| int | findUnmarked (int start, int length) const |
| Finds the first unmarked bit starting at the given position. | |
Private Member Functions | |
| bitVector (const bitVector &b) | |
| The copy constructor is not allowed. | |
| bitVector & | operator= (const bitVector &b) |
| The assignment operator is not allowed. | |
Private Attributes | |
| unsigned char * | buf |
| The array of bytes that represents the bitvector. | |
| int | bufSize |
| Temporarily: The actual size of the buffer. | |
This class defines a bit vector of fixed length.
The bits are initially zero, and can be marked and unmarked. Additionally, convenient functions are available to search for the first marked/unmarked bit in the vector.
Definition at line 47 of file bitvect.h.
| unifexp::bitVector::bitVector | ( | int | length ) | [inline] |
| unifexp::bitVector::~bitVector | ( | ) | [inline] |
| unifexp::bitVector::bitVector | ( | const bitVector & | b ) | [inline, private] |
| int unifexp::bitVector::findMarked | ( | int | start, |
| int | length | ||
| ) | const [inline] |
| int unifexp::bitVector::findUnmarked | ( | int | start, |
| int | length | ||
| ) | const [inline] |
| void unifexp::bitVector::mark | ( | int | bit ) | [inline] |
| void unifexp::bitVector::unmark | ( | int | bit ) | [inline] |
unsigned char* unifexp::bitVector::buf [private] |
The array of bytes that represents the bitvector.
Definition at line 78 of file bitvect.h.
Referenced by bitVector(), findMarked(), findUnmarked(), mark(), unmark(), and ~bitVector().
int unifexp::bitVector::bufSize [private] |
Temporarily: The actual size of the buffer.
Definition at line 81 of file bitvect.h.
Referenced by bitVector(), findMarked(), findUnmarked(), mark(), and unmark().
1.7.2