dune-common
2.4.1
|
A proxy class that acts as a mutable reference to a single bitset in a BitSetVector. More...
#include <dune/common/bitsetvector.hh>
Public Types | |
typedef std::bitset< block_size > | bitset |
typedef size_t | size_type |
size_type typedef (an unsigned integral type) More... | |
typedef std::vector< bool, Alloc >::reference | reference |
typedef std::vector< bool, Alloc >::const_reference | const_reference |
A proxy class that acts as a const reference to a single bit. More... | |
Public Member Functions | |
BitSetVectorReference & | operator= (bool b) |
Assignment from bool, sets each bit in the bitset to b. More... | |
BitSetVectorReference & | operator= (const bitset &b) |
Assignment from bitset. More... | |
BitSetVectorReference & | operator= (const BitSetVectorConstReference &b) |
Assignment from BitSetVectorConstReference. More... | |
BitSetVectorReference & | operator= (const BitSetVectorReference &b) |
Assignment from BitSetVectorReference. More... | |
BitSetVectorReference & | operator&= (const bitset &x) |
Bitwise and (for bitset). More... | |
BitSetVectorReference & | operator&= (const BitSetVectorConstReference &x) |
Bitwise and (for BitSetVectorConstReference and BitSetVectorReference) More... | |
BitSetVectorReference & | operator|= (const bitset &x) |
Bitwise inclusive or (for bitset) More... | |
BitSetVectorReference & | operator|= (const BitSetVectorConstReference &x) |
Bitwise inclusive or (for BitSetVectorConstReference and BitSetVectorReference) More... | |
BitSetVectorReference & | operator^= (const bitset &x) |
Bitwise exclusive or (for bitset). More... | |
BitSetVectorReference & | operator^= (const BitSetVectorConstReference &x) |
Bitwise exclusive or (for BitSetVectorConstReference and BitSetVectorReference) More... | |
BitSetVectorReference & | operator<<= (size_type n) |
Left shift. More... | |
BitSetVectorReference & | operator>>= (size_type n) |
Right shift. More... | |
BitSetVectorReference & | set () |
BitSetVectorReference & | flip () |
Flips the value of every bit. More... | |
BitSetVectorReference & | reset () |
Clears every bit. More... | |
BitSetVectorReference & | set (size_type n, int val=1) |
Sets bit n if val is nonzero, and clears bit n if val is zero. More... | |
BitSetVectorReference & | reset (size_type n) |
Clears bit n. More... | |
BitSetVectorReference & | flip (size_type n) |
Flips bit n. More... | |
reference | operator[] (size_type i) |
bitset | operator<< (size_type n) const |
Returns a copy of *this shifted left by n bits. More... | |
bitset | operator>> (size_type n) const |
Returns a copy of *this shifted right by n bits. More... | |
bitset | operator~ () const |
Returns a copy of *this with all of its bits flipped. More... | |
size_type | size () const |
Returns block_size. More... | |
size_type | count () const |
Returns the number of bits that are set. More... | |
bool | any () const |
Returns true if any bits are set. More... | |
bool | none () const |
Returns true if no bits are set. More... | |
bool | test (size_type n) const |
Returns true if bit n is set. More... | |
const_reference | operator[] (size_type i) const |
operator bitset () const | |
cast to bitset More... | |
bool | operator== (const bitset &bs) const |
Equality of reference and std::bitset. More... | |
bool | operator== (const BitSetVectorConstReference &bs) const |
Equality of reference and other reference. More... | |
bool | operator!= (const bitset &bs) const |
Inequality of reference and std::bitset. More... | |
bool | operator!= (const BitSetVectorConstReference &bs) const |
Inequality of reference and other reference. More... | |
Protected Types | |
typedef Dune::BitSetVector< block_size, Alloc > | BitSetVector |
typedef Dune::BitSetVectorConstReference< block_size, Alloc > | BitSetVectorConstReference |
Protected Member Functions | |
BitSetVectorReference (BitSetVector &blockBitField_, int block_number_) | |
reference | getBit (size_type i) |
const_reference | getBit (size_type i) const |
template<class BS > | |
bool | equals (const BS &bs) const |
Protected Attributes | |
BitSetVector & | blockBitField |
int | block_number |
A proxy class that acts as a mutable reference to a single bitset in a BitSetVector.
It contains an assignment operator from std::bitset. It inherits the const std::bitset interface provided by BitSetVectorConstReference and adds most of the non-const methods of std::bitset.
typedef std::bitset<block_size> Dune::BitSetVectorReference< block_size, Alloc >::bitset |
|
protected |
|
protected |
typedef std::vector<bool, Alloc>::const_reference Dune::BitSetVectorReference< block_size, Alloc >::const_reference |
A proxy class that acts as a const reference to a single bit.
typedef std::vector<bool, Alloc>::reference Dune::BitSetVectorReference< block_size, Alloc >::reference |
bitset interface typedefs
A proxy class that acts as a reference to a single bit.
typedef size_t Dune::BitSetVectorReference< block_size, Alloc >::size_type |
size_type typedef (an unsigned integral type)
|
inlineprotected |
|
inlineinherited |
Returns true if any bits are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::count().
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::none().
|
inlineinherited |
Returns the number of bits that are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::any().
|
inlineprotectedinherited |
|
inline |
Flips the value of every bit.
|
inline |
Flips bit n.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inlineprotectedinherited |
Referenced by Dune::BitSetVectorConstReference< block_size, Alloc >::count(), Dune::BitSetVector< block_size, Allocator >::countmasked(), Dune::BitSetVectorConstReference< block_size, Alloc >::equals(), Dune::BitSetVectorReference< block_size, Alloc >::flip(), Dune::BitSetVectorReference< block_size, Alloc >::operator&=(), Dune::BitSetVectorReference< block_size, Alloc >::operator<<=(), Dune::BitSetVectorReference< block_size, Alloc >::operator=(), Dune::BitSetVectorReference< block_size, Alloc >::operator>>=(), Dune::BitSetVectorConstReference< block_size, Alloc >::operator[](), Dune::BitSetVectorReference< block_size, Alloc >::operator[](), Dune::BitSetVectorReference< block_size, Alloc >::operator^=(), Dune::BitSetVectorReference< block_size, Alloc >::operator|=(), Dune::BitSetVectorReference< block_size, Alloc >::set(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inlineprotected |
|
inlineinherited |
Returns true if no bits are set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::any().
|
inlineinherited |
|
inlineinherited |
Inequality of reference and std::bitset.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
|
inlineinherited |
Inequality of reference and other reference.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
|
inline |
Bitwise and (for bitset).
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inline |
|
inlineinherited |
Returns a copy of *this shifted left by n bits.
|
inline |
|
inline |
Assignment from bool, sets each bit in the bitset to b.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
|
inline |
Assignment from bitset.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
|
inline |
|
inline |
|
inlineinherited |
Equality of reference and std::bitset.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
|
inlineinherited |
Equality of reference and other reference.
References Dune::BitSetVectorConstReference< block_size, Alloc >::equals().
|
inlineinherited |
Returns a copy of *this shifted right by n bits.
|
inline |
Right shift.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inlineinherited |
|
inline |
|
inline |
Bitwise exclusive or (for bitset).
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inline |
Bitwise exclusive or (for BitSetVectorConstReference and BitSetVectorReference)
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inline |
Bitwise inclusive or (for bitset)
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inline |
Bitwise inclusive or (for BitSetVectorConstReference and BitSetVectorReference)
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit(), and Dune::BitSetVectorConstReference< block_size, Alloc >::test().
|
inlineinherited |
Returns a copy of *this with all of its bits flipped.
|
inline |
Clears every bit.
|
inline |
Clears bit n.
|
inline |
|
inline |
Sets bit n if val is nonzero, and clears bit n if val is zero.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
|
inlineinherited |
Returns block_size.
Referenced by Dune::BitSetVector< block_size, Allocator >::back(), Dune::BitSetVector< block_size, Allocator >::countmasked(), and Dune::BitSetVector< block_size, Allocator >::end().
|
inlineinherited |
Returns true if bit n is set.
References Dune::BitSetVectorConstReference< block_size, Alloc >::getBit().
Referenced by Dune::BitSetVectorReference< block_size, Alloc >::flip(), Dune::BitSetVectorReference< block_size, Alloc >::operator&=(), Dune::BitSetVectorReference< block_size, Alloc >::operator<<=(), Dune::BitSetVectorReference< block_size, Alloc >::operator=(), Dune::BitSetVectorReference< block_size, Alloc >::operator>>=(), Dune::BitSetVectorReference< block_size, Alloc >::operator^=(), and Dune::BitSetVectorReference< block_size, Alloc >::operator|=().
|
protectedinherited |
|
protected |