Dune Core Modules (2.9.0)
bitsetvector.hh
Go to the documentation of this file.
3// SPDX-FileCopyrightInfo: Copyright (C) DUNE Project contributors, see file LICENSE.md in module root
331#if defined(__GNUC__) && ! defined(__clang__) && __GNUC__ == 6 && __GNUC_MINOR__ == 3 && __cplusplus \
501 typedef Dune::GenericIterator<BitSetVector<block_size,Allocator>, value_type, reference, std::ptrdiff_t, ForwardIteratorFacade> iterator;
502 typedef Dune::GenericIterator<const BitSetVector<block_size,Allocator>, const value_type, const_reference, std::ptrdiff_t, ForwardIteratorFacade> const_iterator;
Macro for wrapping boundary checks.
A proxy class that acts as a const reference to a single bitset in a BitSetVector.
Definition: bitsetvector.hh:38
bool operator==(const bitset &bs) const
Equality of reference and std::bitset.
Definition: bitsetvector.hh:142
bool test(size_type n) const
Returns true if bit n is set.
Definition: bitsetvector.hh:124
const_reference operator[](size_type i) const
Return reference to the i-th bit.
Definition: bitsetvector.hh:130
bitset operator<<(size_type n) const
Returns a copy of *this shifted left by n bits.
Definition: bitsetvector.hh:64
BitSetVectorConstReference & operator=(const BitSetVectorConstReference &b)
hide assignment operator
bitset operator>>(size_type n) const
Returns a copy of *this shifted right by n bits.
Definition: bitsetvector.hh:72
bool operator!=(const bitset &bs) const
Inequality of reference and std::bitset.
Definition: bitsetvector.hh:154
bool all() const
Returns true if all bits are set.
Definition: bitsetvector.hh:115
bitset operator~() const
Returns a copy of *this with all of its bits flipped.
Definition: bitsetvector.hh:80
size_type size() const
Returns block_size.
Definition: bitsetvector.hh:88
size_type count() const
Returns the number of bits that are set.
Definition: bitsetvector.hh:94
bool none() const
Returns true if no bits are set.
Definition: bitsetvector.hh:109
bool any() const
Returns true if any bits are set.
Definition: bitsetvector.hh:103
A proxy class that acts as a mutable reference to a single bitset in a BitSetVector.
Definition: bitsetvector.hh:222
bool test(size_type n) const
Returns true if bit n is set.
Definition: bitsetvector.hh:124
BitSetVectorReference & operator=(const BitSetVectorConstReference &b)
Assignment from BitSetVectorConstReference.
Definition: bitsetvector.hh:266
reference operator[](size_type i)
Return reference to the i-th bit.
Definition: bitsetvector.hh:413
BitSetVectorReference & reset(size_type n)
Clears bit n.
Definition: bitsetvector.hh:396
BitSetVectorReference & operator<<=(size_type n)
Left shift.
Definition: bitsetvector.hh:350
std::vector< bool, Alloc >::const_reference const_reference
A proxy class that acts as a const reference to a single bit.
Definition: bitsetvector.hh:243
BitSetVectorReference & operator=(const BitSetVectorReference &b)
Assignment from BitSetVectorReference.
Definition: bitsetvector.hh:274
BitSetVectorReference & operator&=(const BitSetVectorConstReference &x)
Bitwise and (for BitSetVectorConstReference and BitSetVectorReference)
Definition: bitsetvector.hh:290
size_t size_type
size_type typedef (an unsigned integral type)
Definition: bitsetvector.hh:247
BitSetVectorReference & operator=(const bitset &b)
Assignment from bitset.
Definition: bitsetvector.hh:258
BitSetVectorReference & reset()
Clears every bit.
Definition: bitsetvector.hh:382
BitSetVectorReference & operator|=(const BitSetVectorConstReference &x)
Bitwise inclusive or (for BitSetVectorConstReference and BitSetVectorReference)
Definition: bitsetvector.hh:306
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:389
BitSetVectorReference & operator^=(const bitset &x)
Bitwise exclusive or (for bitset).
Definition: bitsetvector.hh:314
std::vector< bool, Alloc >::reference reference
Definition: bitsetvector.hh:241
BitSetVectorReference & operator|=(const bitset &x)
Bitwise inclusive or (for bitset)
Definition: bitsetvector.hh:298
BitSetVectorReference & operator>>=(size_type n)
Right shift.
Definition: bitsetvector.hh:358
BitSetVectorReference & operator^=(const BitSetVectorConstReference &x)
Bitwise exclusive or (for BitSetVectorConstReference and BitSetVectorReference)
Definition: bitsetvector.hh:340
BitSetVectorReference & flip(size_type n)
Flips bit n.
Definition: bitsetvector.hh:403
BitSetVectorReference & flip()
Flips the value of every bit.
Definition: bitsetvector.hh:374
BitSetVectorReference & set()
Sets every bit.
Definition: bitsetvector.hh:366
BitSetVectorReference & operator&=(const bitset &x)
Bitwise and (for bitset).
Definition: bitsetvector.hh:282
BitSetVectorReference & operator=(bool b)
Assignment from bool, sets each bit in the bitset to b.
Definition: bitsetvector.hh:250
const_reference operator[](int i) const
Return const reference to i-th block.
Definition: bitsetvector.hh:585
iterator begin()
Returns a iterator pointing to the beginning of the vector.
Definition: bitsetvector.hh:506
BitSetVectorConstReference< block_size, Allocator > * const_pointer
Const pointer to a small block of bits.
Definition: bitsetvector.hh:490
const_iterator end() const
Returns a const_iterator pointing to the end of the vector.
Definition: bitsetvector.hh:521
BitSetVectorReference< block_size, Allocator > reference
Reference to a small block of bits.
Definition: bitsetvector.hh:481
size_type countmasked(int j) const
Returns the number of set bits, while each block is masked with 1<<i.
Definition: bitsetvector.hh:609
BitSetVectorConstReference< block_size, Allocator > const_reference
Const reference to a small block of bits.
Definition: bitsetvector.hh:484
iterator end()
Returns an iterator pointing to the end of the vector.
Definition: bitsetvector.hh:516
size_type count() const
Returns the number of bits that are set.
Definition: bitsetvector.hh:603
std::bitset< block_size > value_type
Type of the values stored by the container.
Definition: bitsetvector.hh:478
reference back()
Return reference to last block.
Definition: bitsetvector.hh:591
BitSetVector(const BlocklessBaseClass &blocklessBitField)
Construction from an unblocked bitfield.
Definition: bitsetvector.hh:531
friend std::ostream & operator<<(std::ostream &s, const BitSetVector &v)
Send bitfield to an output stream.
Definition: bitsetvector.hh:619
const_reference back() const
Return const reference to last block.
Definition: bitsetvector.hh:597
BitSetVectorReference< block_size, Allocator > * pointer
Pointer to a small block of bits.
Definition: bitsetvector.hh:487
reference operator[](int i)
Return reference to i-th block.
Definition: bitsetvector.hh:579
size_type size() const
Return the number of blocks.
Definition: bitsetvector.hh:563
std::vector< bool, Allocator >::size_type size_type
size type
Definition: bitsetvector.hh:493
BitSetVector(int n, bool v)
Constructor which initializes the field with true or false.
Definition: bitsetvector.hh:546
const_iterator begin() const
Returns a const_iterator pointing to the beginning of the vector.
Definition: bitsetvector.hh:511
Dune::GenericIterator< BitSetVector< block_size, Allocator >, value_type, reference, std::ptrdiff_t, ForwardIteratorFacade > iterator
Definition: bitsetvector.hh:501
void resize(int n, bool v=bool())
Resize field.
Definition: bitsetvector.hh:557
Allocator allocator_type
The type of the allocator.
Definition: bitsetvector.hh:496
Base class for stl conformant forward iterators.
Definition: iteratorfacades.hh:141
Generic class for stl-conforming iterators for container classes with operator[].
Definition: genericiterator.hh:153
A few common exception classes.
Implements a generic iterator class for writing stl conformant iterators.
#define DUNE_ASSERT_BOUNDS(cond)
If DUNE_CHECK_BOUNDS is defined: check if condition cond holds; otherwise, do nothing.
Definition: boundschecking.hh:30
bool eq(const T &first, const T &second, typename EpsilonType< T >::Type epsilon)
test for equality using epsilon
Definition: float_cmp.cc:144
constexpr auto equals(T1 &&t1, T2 &&t2)
Equality comparison.
Definition: hybridutilities.hh:402
void assign(T &dst, const T &src, bool mask)
masked Simd assignment (scalar version)
Definition: simd.hh:447
Get the 'const' version of a reference to a mutable object.
Definition: genericiterator.hh:87
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Dec 21, 23:30, 2024)