CLucene - a full-featured, c++ search engine
API Documentation


lucene::util::BitSet Class Reference

#include <BitSet.h>


Public Member Functions

 BitSet (int32_t size)
 Create a bitset with the specified size.
 BitSet (lucene::store::Directory *d, const char *name)
void write (lucene::store::Directory *d, const char *name)
 ~BitSet ()
 Destructor for the bit set.
bool get (const int32_t bit) const
 get the value of the specified bit
void set (const int32_t bit, bool val=true)
 set the value of the specified bit
int32_t size () const
 returns the size of the bitset
int32_t count ()
 Returns the total number of one bits in this BitSet.
BitSetclone () const

Protected Member Functions

 BitSet (const BitSet &copy)


Constructor & Destructor Documentation

lucene::util::BitSet::BitSet ( const BitSet copy  )  [protected]

lucene::util::BitSet::BitSet ( int32_t  size  ) 

Create a bitset with the specified size.

lucene::util::BitSet::BitSet ( lucene::store::Directory d,
const char *  name 
)

lucene::util::BitSet::~BitSet (  ) 

Destructor for the bit set.


Member Function Documentation

void lucene::util::BitSet::write ( lucene::store::Directory d,
const char *  name 
)

bool lucene::util::BitSet::get ( const int32_t  bit  )  const [inline]

get the value of the specified bit

void lucene::util::BitSet::set ( const int32_t  bit,
bool  val = true 
)

set the value of the specified bit

int32_t lucene::util::BitSet::size (  )  const

returns the size of the bitset

int32_t lucene::util::BitSet::count (  ) 

Returns the total number of one bits in this BitSet.

This is efficiently computed and cached, so that, if the BitSet is not changed, no recomputation is done for repeated calls.

BitSet* lucene::util::BitSet::clone (  )  const


The documentation for this class was generated from the following file:

clucene.sourceforge.net