atlas
0.6
|
Base for a non-empty BitSet that fits in two words but not one. More...
#include <bitset.h>
Classes | |
class | iterator |
Public Member Functions | |
bool | operator== (const BitSetBase< 2 > &b) const |
bool | operator!= (const BitSetBase< 2 > &b) const |
bool | operator< (const BitSetBase< 2 > &b) const |
bool | any () const |
bool | none () const |
bool | any (const BitSetBase< 2 > &b) const |
bool | contains (const BitSetBase< 2 > &b) const |
unsigned int | count () const |
unsigned int | firstBit () const |
unsigned int | lastBit () const |
bool | test (unsigned int j) const |
unsigned int | position (unsigned int j) const |
bool | scalarProduct (const BitSetBase< 2 > &b) const |
unsigned long | to_ulong () const |
unsigned long | to_ulong (unsigned int n) const |
iterator | begin () const |
void | operator^= (const BitSetBase< 2 > &b) |
void | operator|= (const BitSetBase< 2 > &b) |
void | operator&= (const BitSetBase< 2 > &b) |
void | operator<<= (unsigned int c) |
void | operator>>= (unsigned int c) |
void | andnot (const BitSetBase< 2 > &b) |
void | flip (unsigned int j) |
void | reset () |
void | reset (unsigned int j) |
void | set (unsigned int j) |
void | fill (unsigned int limit) |
void | complement (unsigned int limit) |
void | truncate (unsigned int limit) |
void | slice (const BitSetBase< 2 > &c) |
void | unslice (const BitSetBase< 2 > &c) |
void | swap (BitSetBase< 2 > &source) |
Protected Member Functions | |
BitSetBase () | |
BitSetBase (unsigned long b) | |
Constructor initializing first word to b and second word to 0. More... | |
template<size_t m> | |
BitSetBase (const BitSet< m > &b) | |
Private Attributes | |
unsigned long | d_bits0 |
unsigned long | d_bits1 |
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.
|
inlineprotected |
|
inlineexplicitprotected |
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 two unsigned longs. However such a constructor will never be called from |BitSet|, so it would be useless. In fact it seems that the current software never needs to construct from an explicit value a |BitSet| that needs more than a single |unsigned long|, even if one should set |constants::RankMax == constants::longBits|; while for instance |gradings::Status::set(size_t,Value)| constructs a |bitsetTwoRankFlags| from an |unsigned long|, the latter is in fact only 2 bits wide, which value is shifted in place after construction by |bitset::TwoRankFlags::operator<<=|.
|
inlineexplicitprotected |
void atlas::bitset::BitSetBase< 2 >::andnot | ( | const BitSetBase< 2 > & | b | ) |
|
inline |
|
inline |
BitSetBase< 2 >::iterator atlas::bitset::BitSetBase< 2 >::begin | ( | ) | const |
void atlas::bitset::BitSetBase< 2 >::complement | ( | unsigned int | limit | ) |
|
inline |
|
inline |
void atlas::bitset::BitSetBase< 2 >::fill | ( | unsigned int | limit | ) |
unsigned int atlas::bitset::BitSetBase< 2 >::firstBit | ( | ) | const |
void atlas::bitset::BitSetBase< 2 >::flip | ( | unsigned int | j | ) |
unsigned int atlas::bitset::BitSetBase< 2 >::lastBit | ( | ) | const |
|
inline |
|
inline |
void atlas::bitset::BitSetBase< 2 >::operator&= | ( | const BitSetBase< 2 > & | b | ) |
|
inline |
void atlas::bitset::BitSetBase< 2 >::operator<<= | ( | unsigned int | c | ) |
|
inline |
void atlas::bitset::BitSetBase< 2 >::operator>>= | ( | unsigned int | c | ) |
void atlas::bitset::BitSetBase< 2 >::operator^= | ( | const BitSetBase< 2 > & | b | ) |
void atlas::bitset::BitSetBase< 2 >::operator|= | ( | const BitSetBase< 2 > & | b | ) |
unsigned int atlas::bitset::BitSetBase< 2 >::position | ( | unsigned int | j | ) | const |
|
inline |
void atlas::bitset::BitSetBase< 2 >::reset | ( | unsigned int | j | ) |
bool atlas::bitset::BitSetBase< 2 >::scalarProduct | ( | const BitSetBase< 2 > & | b | ) | const |
void atlas::bitset::BitSetBase< 2 >::set | ( | unsigned int | j | ) |
void atlas::bitset::BitSetBase< 2 >::slice | ( | const BitSetBase< 2 > & | c | ) |
void atlas::bitset::BitSetBase< 2 >::swap | ( | BitSetBase< 2 > & | source | ) |
bool atlas::bitset::BitSetBase< 2 >::test | ( | unsigned int | j | ) | const |
|
inline |
|
inline |
void atlas::bitset::BitSetBase< 2 >::truncate | ( | unsigned int | limit | ) |
void atlas::bitset::BitSetBase< 2 >::unslice | ( | const BitSetBase< 2 > & | c | ) |
|
private |
|
private |