|
dune-common 2.8.0
|
Loading...
Searching...
No Matches
bitsetvector.hh
Go to the documentation of this file.
329#if defined(__GNUC__) && ! defined(__clang__) && __GNUC__ == 6 && __GNUC_MINOR__ == 3 && __cplusplus \
499 typedef Dune::GenericIterator<BitSetVector<block_size,Allocator>, value_type, reference, std::ptrdiff_t, ForwardIteratorFacade> iterator;
500 typedef Dune::GenericIterator<const BitSetVector<block_size,Allocator>, const value_type, const_reference, std::ptrdiff_t, ForwardIteratorFacade> const_iterator;
Macro for wrapping boundary checks.
Implements a generic iterator class for writing stl conformant iterators.
A few common exception classes.
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition boundschecking.hh:28
const_reference operator[](int i) const
Return const reference to i-th block.
Definition bitsetvector.hh:583
iterator begin()
Returns a iterator pointing to the beginning of the vector.
Definition bitsetvector.hh:504
BitSetVectorConstReference< block_size, Allocator > * const_pointer
Const pointer to a small block of bits.
Definition bitsetvector.hh:488
const_iterator end() const
Returns a const_iterator pointing to the end of the vector.
Definition bitsetvector.hh:519
BitSetVectorReference< block_size, Allocator > reference
Reference to a small block of bits.
Definition bitsetvector.hh:479
size_type countmasked(int j) const
Returns the number of set bits, while each block is masked with 1<<i.
Definition bitsetvector.hh:607
BitSetVectorConstReference< block_size, Allocator > const_reference
Const reference to a small block of bits.
Definition bitsetvector.hh:482
iterator end()
Returns an iterator pointing to the end of the vector.
Definition bitsetvector.hh:514
size_type count() const
Returns the number of bits that are set.
Definition bitsetvector.hh:601
Dune::GenericIterator< const BitSetVector< block_size, Allocator >, const value_type, const_reference, std::ptrdiff_t, ForwardIteratorFacade > const_iterator
Definition bitsetvector.hh:500
std::bitset< block_size > value_type
Type of the values stored by the container.
Definition bitsetvector.hh:476
reference back()
Return reference to last block.
Definition bitsetvector.hh:589
BitSetVector(const BlocklessBaseClass &blocklessBitField)
Construction from an unblocked bitfield.
Definition bitsetvector.hh:529
friend std::ostream & operator<<(std::ostream &s, const BitSetVector &v)
Send bitfield to an output stream.
Definition bitsetvector.hh:617
const_reference back() const
Return const reference to last block.
Definition bitsetvector.hh:595
BitSetVectorReference< block_size, Allocator > * pointer
Pointer to a small block of bits.
Definition bitsetvector.hh:485
reference operator[](int i)
Return reference to i-th block.
Definition bitsetvector.hh:577
size_type size() const
Return the number of blocks.
Definition bitsetvector.hh:561
std::vector< bool, Allocator >::size_type size_type
size type
Definition bitsetvector.hh:491
BitSetVector(int n, bool v)
Constructor which initializes the field with true or false.
Definition bitsetvector.hh:544
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the vector.
Definition bitsetvector.hh:509
Dune::GenericIterator< BitSetVector< block_size, Allocator >, value_type, reference, std::ptrdiff_t, ForwardIteratorFacade > iterator
Definition bitsetvector.hh:499
void resize(int n, bool v=bool())
Resize field.
Definition bitsetvector.hh:555
Allocator allocator_type
The type of the allocator.
Definition bitsetvector.hh:494
A proxy class that acts as a mutable reference to a single bitset in a BitSetVector.
Definition bitsetvector.hh:220
bool test(size_type n) const
Returns true if bit n is set.
Definition bitsetvector.hh:122
BitSetVectorReference & operator=(const BitSetVectorConstReference &b)
Assignment from BitSetVectorConstReference.
Definition bitsetvector.hh:264
reference operator[](size_type i)
Return reference to the i-th bit.
Definition bitsetvector.hh:411
BitSetVectorReference & reset(size_type n)
Clears bit n.
Definition bitsetvector.hh:394
BitSetVectorReference & operator<<=(size_type n)
Left shift.
Definition bitsetvector.hh:348
Dune::BitSetVector< block_size, Alloc > BitSetVector
Definition bitsetvector.hh:223
std::vector< bool, Alloc >::const_reference const_reference
A proxy class that acts as a const reference to a single bit.
Definition bitsetvector.hh:241
BitSetVectorReference & operator=(const BitSetVectorReference &b)
Assignment from BitSetVectorReference.
Definition bitsetvector.hh:272
BitSetVectorReference & operator&=(const BitSetVectorConstReference &x)
Bitwise and (for BitSetVectorConstReference and BitSetVectorReference)
Definition bitsetvector.hh:288
BitSetVectorReference(BitSetVector &blockBitField_, int block_number_)
Definition bitsetvector.hh:228
size_t size_type
size_type typedef (an unsigned integral type)
Definition bitsetvector.hh:245
BitSetVectorReference & operator=(const bitset &b)
Assignment from bitset.
Definition bitsetvector.hh:256
Dune::BitSetVectorConstReference< block_size, Alloc > BitSetVectorConstReference
Definition bitsetvector.hh:226
BitSetVectorReference & reset()
Clears every bit.
Definition bitsetvector.hh:380
BitSetVector & blockBitField
Definition bitsetvector.hh:417
BitSetVectorReference & operator|=(const BitSetVectorConstReference &x)
Bitwise inclusive or (for BitSetVectorConstReference and BitSetVectorReference)
Definition bitsetvector.hh:304
BitSetVectorReference & set(size_type n, int val=1)
Sets bit n if val is nonzero, and clears bit n if val is zero.
Definition bitsetvector.hh:387
BitSetVectorReference & operator^=(const bitset &x)
Bitwise exclusive or (for bitset).
Definition bitsetvector.hh:312
std::vector< bool, Alloc >::reference reference
Definition bitsetvector.hh:239
BitSetVectorReference & operator|=(const bitset &x)
Bitwise inclusive or (for bitset)
Definition bitsetvector.hh:296
BitSetVectorReference & operator>>=(size_type n)
Right shift.
Definition bitsetvector.hh:356
BitSetVectorReference & operator^=(const BitSetVectorConstReference &x)
Bitwise exclusive or (for BitSetVectorConstReference and BitSetVectorReference)
Definition bitsetvector.hh:338
BitSetVectorReference & flip(size_type n)
Flips bit n.
Definition bitsetvector.hh:401
BitSetVectorReference & flip()
Flips the value of every bit.
Definition bitsetvector.hh:372
BitSetVectorReference & set()
Sets every bit.
Definition bitsetvector.hh:364
BitSetVectorReference & operator&=(const bitset &x)
Bitwise and (for bitset).
Definition bitsetvector.hh:280
BitSetVectorReference & operator=(bool b)
Assignment from bool, sets each bit in the bitset to b.
Definition bitsetvector.hh:248
A proxy class that acts as a const reference to a single bitset in a BitSetVector.
Definition bitsetvector.hh:36
bool operator==(const bitset &bs) const
Equality of reference and std::bitset.
Definition bitsetvector.hh:140
bool test(size_type n) const
Returns true if bit n is set.
Definition bitsetvector.hh:122
const_reference operator[](size_type i) const
Return reference to the i-th bit.
Definition bitsetvector.hh:128
bitset operator<<(size_type n) const
Returns a copy of *this shifted left by n bits.
Definition bitsetvector.hh:62
BitSetVectorConstReference & operator=(const BitSetVectorConstReference &b)
hide assignment operator
BitSetVectorConstReference(const BitSetVector &blockBitField_, int block_number_)
Definition bitsetvector.hh:42
const BitSetVector & blockBitField
Definition bitsetvector.hh:179
bitset operator>>(size_type n) const
Returns a copy of *this shifted right by n bits.
Definition bitsetvector.hh:70
const_reference getBit(size_type i) const
Definition bitsetvector.hh:182
bool operator!=(const bitset &bs) const
Inequality of reference and std::bitset.
Definition bitsetvector.hh:152
bool equals(const BS &bs) const
Definition bitsetvector.hh:188
Dune::BitSetVector< block_size, Alloc > BitSetVector
Definition bitsetvector.hh:39
std::bitset< block_size > bitset
Definition bitsetvector.hh:54
bool all() const
Returns true if all bits are set.
Definition bitsetvector.hh:113
bitset operator~() const
Returns a copy of *this with all of its bits flipped.
Definition bitsetvector.hh:78
std::vector< bool, Alloc >::const_reference reference
Definition bitsetvector.hh:57
size_type size() const
Returns block_size.
Definition bitsetvector.hh:86
size_type count() const
Returns the number of bits that are set.
Definition bitsetvector.hh:92
bool none() const
Returns true if no bits are set.
Definition bitsetvector.hh:107
bool any() const
Returns true if any bits are set.
Definition bitsetvector.hh:101
std::vector< bool, Alloc >::const_reference const_reference
Definition bitsetvector.hh:58
friend std::ostream & operator<<(std::ostream &s, const BitSetVectorConstReference &v)
Definition bitsetvector.hh:169
BitSetVectorConstReference< block_size, Alloc > type
Definition bitsetvector.hh:441
BitSetVectorConstReference< block_size, Alloc > type
Definition bitsetvector.hh:447
BitSetVectorReference< block_size, Alloc > type
Definition bitsetvector.hh:453
BitSetVectorReference< block_size, Alloc > type
Definition bitsetvector.hh:459
Get the 'const' version of a reference to a mutable object.
Definition genericiterator.hh:85
get the 'mutable' version of a reference to a const object
Definition genericiterator.hh:114
Generic class for stl-conforming iterators for container classes with operator[].
Definition genericiterator.hh:151
Base class for stl conformant forward iterators.
Definition iteratorfacades.hh:139
T assign(T... args)
T begin(T... args)
T clear(T... args)
T count(T... args)
T end(T... args)
T flip(T... args)
T operator[](T... args)
T resize(T... args)
T size(T... args)
T test(T... args)
Legal Statements / Impressum | Hosted by TU Dresden & Uni Heidelberg | Generated by
1.9.8