Reference documentation for deal.II version 9.3.3
|
#include <deal.II/lac/block_vector_base.h>
Public Types | |
using | size_type = types::global_dof_index |
using | value_type = typename std::conditional< Constness, const typename BlockVectorType::value_type, typename BlockVectorType::value_type >::type |
using | iterator_category = std::random_access_iterator_tag |
using | difference_type = std::ptrdiff_t |
using | reference = typename BlockVectorType::reference |
using | pointer = value_type * |
using | dereference_type = typename std::conditional< Constness, value_type, typename BlockVectorType::BlockType::reference >::type |
using | BlockVector = typename std::conditional< Constness, const BlockVectorType, BlockVectorType >::type |
Public Member Functions | |
Iterator (BlockVector &parent, const size_type global_index) | |
Iterator (const Iterator< BlockVectorType, !Constness > &c) | |
Iterator (const Iterator &c) | |
Iterator & | operator= (const Iterator &c) |
dereference_type | operator* () const |
dereference_type | operator[] (const difference_type d) const |
Iterator & | operator++ () |
Iterator | operator++ (int) |
Iterator & | operator-- () |
Iterator | operator-- (int) |
template<bool OtherConstness> | |
bool | operator== (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
bool | operator!= (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
bool | operator< (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
bool | operator<= (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
bool | operator> (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
bool | operator>= (const Iterator< BlockVectorType, OtherConstness > &i) const |
template<bool OtherConstness> | |
difference_type | operator- (const Iterator< BlockVectorType, OtherConstness > &i) const |
Iterator | operator+ (const difference_type &d) const |
Iterator | operator- (const difference_type &d) const |
Iterator & | operator+= (const difference_type &d) |
Iterator & | operator-= (const difference_type &d) |
Static Public Member Functions | |
static ::ExceptionBase & | ExcPointerToDifferentVectors () |
Private Member Functions | |
Iterator (BlockVector &parent, const size_type global_index, const size_type current_block, const size_type index_within_block, const size_type next_break_forward, const size_type next_break_backward) | |
void | move_forward () |
void | move_backward () |
Private Attributes | |
BlockVector * | parent |
size_type | global_index |
unsigned int | current_block |
size_type | index_within_block |
size_type | next_break_forward |
size_type | next_break_backward |
Friends | |
template<typename , bool > | |
class | Iterator |
General random-access iterator class for block vectors. Since we do not want to have two classes for non-const iterator and const_iterator, we take a second template argument which denotes whether the vector we point into is a constant object or not. The first template argument is always the number type of the block vector in use.
This class satisfies all requirements of random access iterators defined in the C++ standard. Operations on these iterators are constant in the number of elements in the block vector. However, they are sometimes linear in the number of blocks in the vector, but since that does rarely change dynamically within an application, this is a constant and we again have that the iterator satisfies the requirements of a random access iterator.
Definition at line 125 of file block_vector_base.h.