Utils - Bit-Vector

Classes

struct  BitVectorBits< S >
struct  BitVectorBits< 0 >
class  BitVectorPointer
class  BitVector< S >

Variables

const unsigned BitVectorIndexShift
const unsigned BitVectorIndexMask = (1<<BitVectorIndexShift)-1

Detailed Description

Classes for constructing and manipluating a bit-vector (array of bits).

The BitVectorBits class is a template for constructing a memory buffer to contain a bit-vector. Bits are stored in unsigned integers, where bit index 0 is the least significant bit of the first integer.

The concrete class which is used to manipulation the contents of a bit-vector is BitVectorPointer. This only contains the address and size of the buffer containing the bits, which enables the methods to work on arbitrary memory.

BitVector is a thin template which wraps up both BitVectorBits and BitVectorPointer, providing an object contining a bit-vector and the methods to manipuate it.


Variable Documentation

const unsigned BitVectorIndexShift

Shift value to scale bit index to index into BitVectorBits::Buffer. This is log2 of the number of bits in an unsigned int.

Definition at line 58 of file bitvector.h.

const unsigned BitVectorIndexMask = (1<<BitVectorIndexShift)-1

Bitmask to obtain bit poision for a bit within a single entry in BitVectorBits::Buffer.

Definition at line 67 of file bitvector.h.


Generated by  doxygen 1.6.1