Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

atlas::bitset::BitSetBase< 1 > Class Template Reference

Base for a non-empty BitSet that fits in one word. More...

#include <bitset.h>

List of all members.

Protected Member Functions

 BitSetBase ()
 BitSetBase (unsigned long b)
 ~BitSetBase ()
template<size_t m>
 BitSetBase (const BitSet< m > &b)
 Copies from another bitset size by truncating at the end of the first word.
template<size_t m>
BitSetBase< 1 > & operator= (const BitSet< m > &b)
 Assigns from another bitset size by truncating at the end of the first word.
bool operator== (const BitSetBase< 1 > &b) const
bool operator!= (const BitSetBase< 1 > &b) const
bool operator< (const BitSetBase< 1 > &b) const
bool operator[] (size_t j) const
 Returns the value of bit j in the BitSet.
bool any () const
 Returns 1 if any bit of the BitSet is 1, and 0 otherwise.
bool any (const BitSetBase< 1 > &b) const
iterator begin () const
bool contains (const BitSetBase< 1 > &b) const
 Tests whether this bitset contains b.
size_t count () const
 Number of set bits in BitSet.
size_t firstBit () const
size_t lastBit () const
bool none () const
size_t position (size_t j) const
bool scalarProduct (const BitSetBase< 1 > &b) const
 Number of set bits in position < j.
bool test (size_t j) const
unsigned long to_ulong () const
unsigned long to_ulong1 () const
BitSetBase< 1 > & operator^= (const BitSetBase< 1 > &b)
BitSetBase< 1 > & operator|= (const BitSetBase< 1 > &b)
BitSetBase< 1 > & operator &= (const BitSetBase< 1 > &b)
BitSetBase< 1 > & operator<<= (size_t c)
BitSetBase< 1 > & operator>>= (size_t c)
BitSetBase< 1 > & andnot (const BitSetBase< 1 > &b)
BitSetBase< 1 > & flip ()
BitSetBase< 1 > & flip (size_t j)
BitSetBase< 1 > & permute (const setutils::Permutation &a)
BitSetBase< 1 > & reset ()
BitSetBase< 1 > & reset (size_t j)
BitSetBase< 1 > & set ()
BitSetBase< 1 > & set (size_t j)
BitSetBase< 1 > & set (size_t j, bool b)
BitSetBase< 1 > & slice (const BitSetBase< 1 > &c)
void swap (BitSetBase< 1 > &source)
BitSetBase< 1 > & truncate (size_t m)

Private Attributes

unsigned long d_bits
 Word that holds the BitSet.


Detailed Description

template<>
class atlas::bitset::BitSetBase< 1 >

Base for a non-empty BitSet that fits in one word.

With RANK_MAX=16, this template should be the only one instantiated on a 32-bit machine.

The BitSet class BitSet<n>, for n between 1 and the machine word length (more precisely, the constant longBits), is a derived class of BitSetBase<1>.

Definition at line 99 of file bitset.h.


Constructor & Destructor Documentation

atlas::bitset::BitSetBase< 1 >::~BitSetBase  )  [inline, protected]
 


Member Function Documentation

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::andnot const BitSetBase< 1 > &  b  )  [inline, protected]
 

Definition at line 270 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::any const BitSetBase< 1 > &  b  )  const [inline, protected]
 

Definition at line 175 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::any  )  const [inline, protected]
 

Returns 1 if any bit of the BitSet is 1, and 0 otherwise.

Definition at line 171 of file bitset.h.

BitSetBase< 1 >::iterator atlas::bitset::BitSetBase< 1 >::begin  )  const [protected]
 

Synopsis : returns an iterator pointing to the first set bit; this is essentially just d_bits itself.

Definition at line 26 of file bitset.cpp.

template<size_t m>
atlas::bitset::BitSetBase< 1 >::BitSetBase const BitSet< m > &  b  )  [inline, explicit, protected]
 

Copies from another bitset size by truncating at the end of the first word.

For each BitSet size, to_ulong is the word holding the first longBits (machine word size) of the BitSet. This copy constructor therefore truncates b at the end of its first word.

atlas::bitset::BitSetBase< 1 >::BitSetBase unsigned long  b  )  [inline, explicit, protected]
 

atlas::bitset::BitSetBase< 1 >::BitSetBase  )  [inline, protected]
 

bool atlas::bitset::BitSetBase< 1 >::contains const BitSetBase< 1 > &  b  )  const [inline, protected]
 

Tests whether this bitset contains b.

Returns whether if every set bit of b is also set in this BitSet.

Definition at line 186 of file bitset.h.

size_t atlas::bitset::BitSetBase< 1 >::count  )  const [inline, protected]
 

Number of set bits in BitSet.

Definition at line 192 of file bitset.h.

References atlas::bits::bitCount().

size_t atlas::bitset::BitSetBase< 1 >::firstBit  )  const [inline, protected]
 

Definition at line 196 of file bitset.h.

References atlas::bits::firstBit().

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::flip size_t  j  )  [inline, protected]
 

Definition at line 280 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::flip  )  [inline, protected]
 

Definition at line 275 of file bitset.h.

size_t atlas::bitset::BitSetBase< 1 >::lastBit  )  const [inline, protected]
 

Definition at line 200 of file bitset.h.

References atlas::bits::lastBit().

bool atlas::bitset::BitSetBase< 1 >::none  )  const [inline, protected]
 

Definition at line 204 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator &= const BitSetBase< 1 > &  b  )  [inline, protected]
 

Definition at line 243 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::operator!= const BitSetBase< 1 > &  b  )  const [inline, protected]
 

Definition at line 155 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::operator< const BitSetBase< 1 > &  b  )  const [inline, protected]
 

Definition at line 159 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator<<= size_t  c  )  [inline, protected]
 

We have to make sure that shift by constants::longBits yields 0.

Definition at line 248 of file bitset.h.

template<size_t m>
BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator= const BitSet< m > &  b  )  [inline, protected]
 

Assigns from another bitset size by truncating at the end of the first word.

For each BitSet size, to_ulong is the word holding the first longBits (machine word size) of the BitSet. This assignment operator therefore truncates b at the end of its first word.

Definition at line 144 of file bitset.h.

References atlas::bitset::BitSet< n >::to_ulong().

bool atlas::bitset::BitSetBase< 1 >::operator== const BitSetBase< 1 > &  b  )  const [inline, protected]
 

Definition at line 151 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator>>= size_t  c  )  [inline, protected]
 

We have to make sure that shift by constants::longBits yields 0.

Definition at line 259 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::operator[] size_t  j  )  const [inline, protected]
 

Returns the value of bit j in the BitSet.

Definition at line 165 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator^= const BitSetBase< 1 > &  b  )  [inline, protected]
 

Definition at line 233 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::operator|= const BitSetBase< 1 > &  b  )  [inline, protected]
 

Definition at line 238 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::permute const setutils::Permutation a  )  [inline, protected]
 

Definition at line 285 of file bitset.h.

References atlas::bits::permute().

size_t atlas::bitset::BitSetBase< 1 >::position size_t  j  )  const [inline, protected]
 

If j is set, this is the position of j in the collection of set bits.

Definition at line 208 of file bitset.h.

References atlas::bits::bitCount().

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::reset size_t  j  )  [inline, protected]
 

Definition at line 295 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::reset  )  [inline, protected]
 

Definition at line 290 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::scalarProduct const BitSetBase< 1 > &  b  )  const [protected]
 

Number of set bits in position < j.

Synopsis: returns the parity of *this & b.

Definition at line 37 of file bitset.cpp.

References atlas::bits::bitCount().

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::set size_t  j,
bool  b
[inline, protected]
 

Definition at line 310 of file bitset.h.

References atlas::bitset::set().

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::set size_t  j  )  [inline, protected]
 

Definition at line 305 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::set  )  [inline, protected]
 

Definition at line 300 of file bitset.h.

BitSetBase< 1 > & atlas::bitset::BitSetBase< 1 >::slice const BitSetBase< 1 > &  c  )  [protected]
 

Definition at line 50 of file bitset.cpp.

References atlas::bitset::set(), and test().

void atlas::bitset::BitSetBase< 1 >::swap BitSetBase< 1 > &  source  )  [inline, protected]
 

Definition at line 320 of file bitset.h.

bool atlas::bitset::BitSetBase< 1 >::test size_t  j  )  const [inline, protected]
 

Definition at line 219 of file bitset.h.

unsigned long atlas::bitset::BitSetBase< 1 >::to_ulong  )  const [inline, protected]
 

Definition at line 223 of file bitset.h.

unsigned long atlas::bitset::BitSetBase< 1 >::to_ulong1  )  const [inline, protected]
 

Definition at line 227 of file bitset.h.

BitSetBase<1>& atlas::bitset::BitSetBase< 1 >::truncate size_t  m  )  [inline, protected]
 

Definition at line 324 of file bitset.h.


Member Data Documentation

unsigned long atlas::bitset::BitSetBase< 1 >::d_bits [private]
 

Word that holds the BitSet.

Definition at line 105 of file bitset.h.


The documentation for this class was generated from the following files:
Generated on Wed Mar 26 16:52:18 2008 for atlas by  doxygen 1.3.9.1