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

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

Base for a non-empty BitSet that fits in two words but not one. More...

#include <bitset.h>

List of all members.

Public Member Functions

 BitSetBase ()
 BitSetBase (unsigned long b)
 Constructor initializing first word to b and second word to 0.
 BitSetBase (unsigned long b[2])
 ~BitSetBase ()
template<size_t m>
 BitSetBase (const BitSet< m > &b)
template<size_t m>
BitSetBase< 2 > & operator= (const BitSet< m > &b)
bool operator== (const BitSetBase< 2 > &b) const
bool operator!= (const BitSetBase< 2 > &b) const
bool operator< (const BitSetBase< 2 > &b) const
bool operator[] (size_t j) const
bool any () const
bool any (const BitSetBase< 2 > &b) const
iterator begin () const
 Not yet implemented.
bool contains (const BitSetBase< 2 > &b) const
size_t count () const
size_t firstBit () const
size_t lastBit () const
bool none () const
size_t position (size_t j) const
 Number of set bits in position < j.
bool scalarProduct (const BitSetBase< 2 > &b) const
bool test (size_t j) const
unsigned long to_ulong () const
unsigned long to_ulong1 () const
BitSetBase< 2 > & operator^= (const BitSetBase< 2 > &b)
BitSetBase< 2 > & operator|= (const BitSetBase< 2 > &b)
BitSetBase< 2 > & operator &= (const BitSetBase< 2 > &b)
BitSetBase< 2 > & operator<<= (size_t c)
BitSetBase< 2 > & operator>>= (size_t c)
BitSetBase< 2 > & andnot (const BitSetBase< 2 > &b)
BitSetBase< 2 > & flip ()
BitSetBase< 2 > & flip (size_t j)
BitSetBase< 2 > & permute (const setutils::Permutation &a)
BitSetBase< 2 > & reset ()
BitSetBase< 2 > & reset (size_t j)
BitSetBase< 2 > & set ()
BitSetBase< 2 > & set (size_t j)
BitSetBase< 2 > & set (size_t j, bool b)
BitSetBase< 2 > & slice (const BitSetBase< 1 > &c)
void swap (BitSetBase< 2 > &source)
BitSetBase< 2 > & truncate (size_t m)

Private Attributes

unsigned long d_bits [2]
 Array of two words that holds the BitSet.


Detailed Description

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

Base for a non-empty BitSet that fits in two words but not one.

The BitSet class BitSet<n>, for n between machine word length + 1 and twice machine word length, is a derived class of BitSetBase<2>. Should not be instantiated on a 32 bit machine with RANK_MAX=16.

Definition at line 400 of file bitset.h.


Constructor & Destructor Documentation

atlas::bitset::BitSetBase< 2 >::~BitSetBase  )  [inline]
 


Member Function Documentation

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::andnot const BitSetBase< 2 > &  b  )  [inline]
 

Definition at line 619 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::any const BitSetBase< 2 > &  b  )  const [inline]
 

Definition at line 485 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::any  )  const [inline]
 

Definition at line 481 of file bitset.h.

iterator atlas::bitset::BitSetBase< 2 >::begin  )  const
 

Not yet implemented.

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

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

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

Constructor initializing first word to b and second word to 0.

[added by DV to let the software compile with RANK_MAX equal to the machine word size.]

The class BitSet assumes that BitSetBase has a constructor with argument an unsigned long. This is slightly sloppy coding, since BitSetBase<2> is most naturally constructed using an array of two unsigned longs (as in the next constructor). This constructor is actually used in the present software only to initialize the first one or two bits (for example in the definition of the manipulator Status::set(size_t,Value) in gradings.h). So this crude construction seems to work.

atlas::bitset::BitSetBase< 2 >::BitSetBase  )  [inline]
 

bool atlas::bitset::BitSetBase< 2 >::contains const BitSetBase< 2 > &  b  )  const [inline]
 

Definition at line 495 of file bitset.h.

size_t atlas::bitset::BitSetBase< 2 >::count  )  const [inline]
 

Definition at line 499 of file bitset.h.

References atlas::bits::bitCount().

size_t atlas::bitset::BitSetBase< 2 >::firstBit  )  const [inline]
 

Definition at line 503 of file bitset.h.

References atlas::bits::firstBit().

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::flip size_t  j  )  [inline]
 

Definition at line 631 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::flip  )  [inline]
 

Definition at line 625 of file bitset.h.

size_t atlas::bitset::BitSetBase< 2 >::lastBit  )  const [inline]
 

Definition at line 510 of file bitset.h.

References atlas::bits::lastBit().

bool atlas::bitset::BitSetBase< 2 >::none  )  const [inline]
 

Definition at line 517 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::operator &= const BitSetBase< 2 > &  b  )  [inline]
 

Definition at line 564 of file bitset.h.

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

Definition at line 470 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::operator< const BitSetBase< 2 > &  b  )  const [inline]
 

Definition at line 474 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::operator<<= size_t  c  )  [inline]
 

Definition at line 570 of file bitset.h.

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

Definition at line 458 of file bitset.h.

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

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

Definition at line 466 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::operator>>= size_t  c  )  [inline]
 

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

Copy bottom of d_bits[1] onto top of d_bits[0].

Definition at line 592 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::operator[] size_t  j  )  const [inline]
 

Definition at line 479 of file bitset.h.

References test().

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

Definition at line 552 of file bitset.h.

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

Definition at line 558 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::permute const setutils::Permutation a  ) 
 

size_t atlas::bitset::BitSetBase< 2 >::position size_t  j  )  const [inline]
 

Number of set bits in position < j.

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

Definition at line 526 of file bitset.h.

References atlas::bits::bitCount().

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::reset size_t  j  )  [inline]
 

Definition at line 645 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::reset  )  [inline]
 

Definition at line 639 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::scalarProduct const BitSetBase< 2 > &  b  )  const
 

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

Definition at line 663 of file bitset.h.

References atlas::bitset::set().

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::set size_t  j  )  [inline]
 

Definition at line 657 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::set  )  [inline]
 

Definition at line 651 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::slice const BitSetBase< 1 > &  c  ) 
 

void atlas::bitset::BitSetBase< 2 >::swap BitSetBase< 2 > &  source  )  [inline]
 

Definition at line 673 of file bitset.h.

bool atlas::bitset::BitSetBase< 2 >::test size_t  j  )  const [inline]
 

Definition at line 537 of file bitset.h.

unsigned long atlas::bitset::BitSetBase< 2 >::to_ulong  )  const [inline]
 

Definition at line 542 of file bitset.h.

unsigned long atlas::bitset::BitSetBase< 2 >::to_ulong1  )  const [inline]
 

Definition at line 546 of file bitset.h.

BitSetBase<2>& atlas::bitset::BitSetBase< 2 >::truncate size_t  m  )  [inline]
 

Definition at line 678 of file bitset.h.


Member Data Documentation

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

Array of two words that holds the BitSet.

Definition at line 405 of file bitset.h.


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