Tools.h++ Class Reference

Table Of Contents
RWBoolean
testBit(size_t i) const;
Tests the bit with index i. The index i must be between 0 and size-1. No bounds checking is
performed. The following are equivalent, although testBit(size_t) is slightly smaller and
faster than using operator()(size_t):
if( a(i) ) doSomething();
if( a.testBit(i) ) doSomething();
Related Global Functions
RWGBitVec(sz)
operator&(const RWGBitVec(sz)& v1, const RWGBitVec(sz)& v2);
RWGBitVec(sz)
operator^(const RWGBitVec(sz)& v1, const RWGBitVec(sz)& v2);
RWGBitVec(sz)
operator|(const RWGBitVec(sz)& v1, const RWGBitVec(sz)& v2);
Return the logical AND, XOR, and OR, respectively, of vectors v1 and v2.
RWBoolean
operator==(const RWGBitVec(sz)& v1, const RWGBitVec(sz)& v2)
const;
Returns TRUE if each bit of v1 is set to the same value as the corresponding bit in v2.
Otherwise, returns FALSE.
RWBoolean
operator!=(const RWGBitVec(sz)& v1, const RWGBitVec(sz)& v2)
const;
Returns FALSE if each bit of v1 is set to the same value as the corresponding bit in v2.
Otherwise, returns TRUE.