DUNE-FEM (unstable)
vbvector.hh
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright © DUNE Project contributors, see file LICENSE.md in module root
55 using VectorWindows = std::vector<window_type, typename std::allocator_traits<A>::template rebind_alloc<window_type>>;
58 static_assert(not std::is_same_v<B,bool>, "Block type 'bool' not supported by VariableBlockVector.");
Helper functions for determining the vector/matrix block level.
This file implements a vector space as a tensor product of a given vector space. The number of compon...
An iterator mixin that adds an index() method returning an enumeration index for the traversal.
Definition: indexediterator.hh:29
Iterator class for sequential creation of blocks.
Definition: vbvector.hh:275
bool operator==(const CreateIterator &it) const
equality
Definition: vbvector.hh:339
size_type index() const
dereferencing
Definition: vbvector.hh:345
SizeProxy reference
reference type
Definition: vbvector.hh:295
size_type * pointer
pointer type
Definition: vbvector.hh:292
bool operator!=(const CreateIterator &it) const
inequality
Definition: vbvector.hh:333
size_type value_type
value type
Definition: vbvector.hh:281
CreateIterator(VariableBlockVector &_v, int _i, bool _isEnd)
constructor
Definition: vbvector.hh:298
void setblocksize(size_type _k)
set size of current block
Definition: vbvector.hh:351
size_type & operator*()
Access size of current block.
Definition: vbvector.hh:362
std::output_iterator_tag iterator_category
iterator category
Definition: vbvector.hh:278
CreateIterator & operator++()
prefix increment
Definition: vbvector.hh:316
void difference_type
difference type (unused)
Definition: vbvector.hh:289
VariableBlockVector(size_type numBlocks, size_type blockSize)
Construct a vector with given number of blocks each having a constant size.
Definition: vbvector.hh:125
VariableBlockVector()
Constructor without arguments makes an empty vector.
Definition: vbvector.hh:102
friend void swap(VariableBlockVector &lhs, VariableBlockVector &rhs) noexcept
Free function to swap the storage and internal state of lhs with rhs.
Definition: vbvector.hh:190
VariableBlockVector & operator=(VariableBlockVector tmp)
Copy and move assignment.
Definition: vbvector.hh:171
VariableBlockVector(size_type numBlocks)
Construct a vector with given number of blocks, but size of each block is not yet known.
Definition: vbvector.hh:112
typename Imp::BlockTraits< B >::field_type field_type
export the type representing the field
Definition: vbvector.hh:65
typename A::size_type size_type
The size type for the index access.
Definition: vbvector.hh:83
size_type N() const noexcept
number of blocks in the vector (are of variable size here)
Definition: vbvector.hh:502
VariableBlockVector(const VariableBlockVector &a)
Copy constructor, has copy semantics.
Definition: vbvector.hh:142
window_type & operator[](size_type i)
random access to blocks
Definition: vbvector.hh:397
A allocator_type
export the allocator type
Definition: vbvector.hh:68
CreateIterator createend()
get create iterator pointing to one after the last block
Definition: vbvector.hh:386
VariableBlockVector(VariableBlockVector &&tmp)
Move constructor:
Definition: vbvector.hh:161
CreateIterator createbegin()
get initial create iterator
Definition: vbvector.hh:377
window_type & reference
Export type used for references to container entries.
Definition: vbvector.hh:74
ConstIterator rend() const
end ConstIterator
Definition: vbvector.hh:478
const window_type & const_reference
Export type used for const references to container entries.
Definition: vbvector.hh:80
ConstIterator find(size_type i) const
random access returning iterator (end if not contained)
Definition: vbvector.hh:492
Iterator find(size_type i)
random access returning iterator (end if not contained)
Definition: vbvector.hh:484
IndexedIterator< typename VectorWindows::const_iterator > ConstIterator
Const iterator.
Definition: vbvector.hh:446
void resize(size_type numBlocks)
same effect as constructor with same argument
Definition: vbvector.hh:196
void swap(VariableBlockVector &other) noexcept
Exchange the storage and internal state with other.
Definition: vbvector.hh:178
ConstIterator begin() const
begin ConstIterator
Definition: vbvector.hh:452
void resize(size_type numBlocks, size_type blockSize)
same effect as constructor with same argument
Definition: vbvector.hh:210
Type traits to determine the type of reals (when working with complex numbers)
This file implements iterator facade classes for writing stl conformant iterators.
|
Legal Statements / Impressum |
Hosted by TU Dresden |
generated with Hugo v0.111.3
(Nov 21, 23:30, 2024)