![]() |
Reference documentation for deal.II version 9.1.1
|
#include <deal.II/lac/sparsity_pattern.h>
Public Types | |
| using | size_type = types::global_dof_index |
| using | container_pointer_type = SparsityPatternBase * |
Public Types inherited from LinearIndexIterator< Iterator, Accessor > | |
| using | iterator_category = std::random_access_iterator_tag |
| using | value_type = Accessor |
| using | difference_type = std::ptrdiff_t |
| using | reference = const value_type & |
| using | pointer = const value_type * |
| using | size_type = typename value_type::size_type |
Public Member Functions | |
| Iterator (const SparsityPatternBase *sp, const std::size_t linear_index) | |
| Iterator (const Accessor &accessor) | |
Public Member Functions inherited from LinearIndexIterator< Iterator, Accessor > | |
| Iterator & | operator= (const Iterator &it) |
| Iterator & | operator++ () |
| Iterator | operator++ (int) |
| Iterator & | operator-- () |
| Iterator | operator-- (int) |
| Iterator | operator+ (const difference_type n) const |
| Iterator | operator- (const difference_type n) const |
| difference_type | operator- (const Iterator &p) const |
| Iterator & | operator+= (const difference_type n) |
| Iterator & | operator-= (const difference_type n) |
| reference | operator* () const |
| pointer | operator-> () const |
| bool | operator== (const Iterator &) const |
| bool | operator!= (const Iterator &) const |
| bool | operator<= (const Iterator &) const |
| bool | operator>= (const Iterator &) const |
| bool | operator< (const Iterator &) const |
| bool | operator> (const Iterator &) const |
Additional Inherited Members | |
Protected Member Functions inherited from LinearIndexIterator< Iterator, Accessor > | |
| LinearIndexIterator (const Accessor accessor) | |
Protected Attributes inherited from LinearIndexIterator< Iterator, Accessor > | |
| Accessor | accessor |
An iterator class for walking over the elements of a sparsity pattern.
The typical use for these iterators is to iterate over the elements of a sparsity pattern (or, since they also serve as the basis for iterating over the elements of an associated matrix, over the elements of a sparse matrix), or over the elements of individual rows. There is no guarantee that the elements of a row are actually traversed in an order in which column numbers monotonically increase. See the documentation of the SparsityPattern class for more information.
operations for a matrix with
row). As a consequence, when you design algorithms that use these iterators, it is common practice to not loop over all elements of a sparsity pattern at once, but to have an outer loop over all rows and within this loop iterate over the elements of this row. This way, you only ever need to dereference the iterator to obtain the column indices whereas the (expensive) lookup of the row index can be avoided by using the loop index instead. Definition at line 283 of file sparsity_pattern.h.
1.8.16