Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWBitVec

Module:  Essential Tools Module   Group:  Traditional Collection


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/bitvec.h>
RWBitVec v;

Description

Class RWBitVec is a bit vector whose length can be changed at run time. Because this requires an extra level of indirection, this makes it slightly less efficient than classes RWGBitVec(size) or RWTBitVec<Size>, whose lengths are fixed at compile time.

Persistence

Simple

Example

Program output:

Public Constructors

RWBitVec();
RWBitVec(size_t N);
RWBitVec(size_t N, RWBoolean initVal);
RWBitVec(const RWByte* bp, size_t N);
RWBitVec(const RWBitVec& v);

Public Destructor

~RWBitVec();

Assignment Operators

RWBitVec&
operator=(const RWBitVec& v);
RWBitVec&
operator=(RWBoolean b);
RWBitVec&
operator&=(const RWBitVec& v);
RWBitVec&
operator^=(const RWBitVec& v);
RWBitVec&
operator|=(const RWBitVec& v);

Indexing Operators

RWBitRef
operator[](size_t i);
RWBitRef
operator()(size_t i);
RWBoolean
operator[](size_t i) const;
RWBoolean
operator()(size_t i) const;

Logical Operators

RWBoolean
operator==(const RWBitVec& u) const;
RWBoolean
operator!=(const RWBitVec& u) const;
RWBoolean
operator==(RWBoolean b) const;
RWBoolean
operator!=(RWBoolean b) const;

Public Member Functions

void
clearBit(size_t i);
const RWByte*
data() const;
size_t
firstFalse() const;
size_t
firstTrue() const;
unsigned
hash() const;
RWBoolean
isEqual(const RWBitVec& v) const;
size_t
length() const;
ostream&
printOn(ostream& s) const;
void
resize(size_t N);
istream&
scanFrom(istream&);
void
setBit(size_t i);
size_t
sum(const RWBitVec& v);
RWBoolean
testBit(size_t i) const;

Related Global Functions

RWBitVec
operator!(const RWBitVec& v);
RWBitVec
operator&(const RWBitVec&,const RWBitVec&);
RWBitVec
operator^(const RWBitVec&,const RWBitVec&);
RWBitVec
operator|(const RWBitVec&,const RWBitVec&);
ostream&
operator<<(ostream& s, const RWBitVec& v);
istream&
operator>>(istream& s, RWBitVec& v);
RWvostream&
operator<<(RWvostream&, const RWBitVec& vec);
RWFile&
operator<<(RWFile&,     const RWBitVec& vec);
RWvistream&
operator>>(RWvistream&, RWBitVec& vec);
RWFile&
operator>>(RWFile&,     RWBitVec& vec);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.