Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

BitSet Class Reference

#include <BitSet.hpp>

List of all members.

Public Methods

 BitSet (unsigned int nbits=64)
 BitSet (const unsigned long *bits_, unsigned int nlongs)
 ~BitSet ()
void add (unsigned int el)
bool member (unsigned int el) const
 ANTLR_USE_NAMESPACE (std) vector< unsigned int > toArray() const


Detailed Description

A BitSet to replace java.util.BitSet. Primary differences are that most set operators return new sets as opposed to oring and anding "in place". Further, a number of operations were added. I cannot contain a BitSet because there is no way to access the internal bits (which I need for speed) and, because it is final, I cannot subclass to add functionality. Consider defining set degree. Without access to the bits, I must call a method n times to test the ith bit...ack!

Also seems like or() from util is wrong when size of incoming set is bigger than this.length.

This is a C++ version of the Java class described above, with only a handful of the methods implemented, because we don't need the others at runtime. It's really just a wrapper around vector<bool>, which should probably be changed to a wrapper around bitset, once bitset is more widely available.

Author:
Terence Parr, MageLang Institute ,
Pete Wells


Constructor & Destructor Documentation

BitSet::BitSet unsigned int    nbits = 64
 

BitSet::BitSet const unsigned long *    bits_,
unsigned int    nlongs
 

BitSet::~BitSet  
 


Member Function Documentation

void BitSet::add unsigned int    el
 

BitSet::ANTLR_USE_NAMESPACE std    const
 

bool BitSet::member unsigned int    el const
 


The documentation for this class was generated from the following files:
Generated on Wed Nov 3 12:59:25 2004 for Lemur Toolkit by doxygen1.2.18