w_bitvector_t< BIT_COUNT > Class Template Reference

List of all members.

Detailed Description

template<int BIT_COUNT>
class w_bitvector_t< BIT_COUNT >

Templated bitmap for arbitrary size in bits.

Definition at line 58 of file w_bitvector.h.

Public Types

typedef unsigned long Word
enum  

Public Member Functions

 w_bitvector_t ()
int num_bits () const
 return size in bits
int num_words () const
 return size in words (unsigned long)
bool overlap (w_bitvector_t &merged, const w_bitvector_t &other) const
 OR-together and return merged vector.
int words_overlap (w_bitvector_t &merged, const w_bitvector_t &other) const
 OR-together and return merged vector.
ostream & print (ostream &o) const
void clear ()
 clear all bits
bool is_empty () const
 true if all bits are clear
int num_bits_set () const
bool is_full () const
 true if all bits are set
void copy (const w_bitvector_t &other)
 copy operator
Word get_bit (Word idx) const
 Should use is_set().
bool is_set (Word idx) const
 true if bit at index idx is set
void set_bit (Word idx)
 set bit at index idx
void clear_bit (Word idx)
 clear bit at index idx


Member Function Documentation

template<int BIT_COUNT>
bool w_bitvector_t< BIT_COUNT >::overlap ( w_bitvector_t< BIT_COUNT > &  merged,
const w_bitvector_t< BIT_COUNT > &  other 
) const [inline]

OR-together and return merged vector.

OR-together this bitmap with other bitmap and stuff result into merged. Return true if this entire bitmap is found in the other.

Definition at line 90 of file w_bitvector.h.

References w_bitvector_t< BIT_COUNT >::num_words(), and w_bitvector_t< BIT_COUNT >::words_overlap().

Here is the call graph for this function:

template<int BIT_COUNT>
int w_bitvector_t< BIT_COUNT >::words_overlap ( w_bitvector_t< BIT_COUNT > &  merged,
const w_bitvector_t< BIT_COUNT > &  other 
) const [inline]

OR-together and return merged vector.

OR-together this bitmap with other bitmap and stuff result into merged. Return the number of words in which this bitmap is found in the other bitmap.

Definition at line 102 of file w_bitvector.h.

References w_bitvector_t< BIT_COUNT >::data, and w_bitvector_t< BIT_COUNT >::num_words().

Referenced by w_bitvector_t< BIT_COUNT >::overlap().

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following file:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7