dune-istl 2.12-git
Loading...
Searching...
No Matches
Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator Class Reference

Row-wise build API. More...

#include <dune/istl/experimental/bcrsmatrix.hh>

Inheritance diagram for Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator:
Inheritance graph

Public Member Functions

 CreateIterator (CreateIterator &&other) noexcept
 Move-construct from another iterator.
 
CreateIterator & operator= (CreateIterator &&other) noexcept
 Move-assign from another iterator.
 
CreateIterator & operator++ ()
 Advance to the next row; when the last row is completed, finalize the matrix.
 
constexpr void insert (index_type j)
 Insert index j into the current index set. Duplicate insertions are silently ignored.
 
constexpr bool contains (index_type j) const
 Returns true if index j has already been inserted into the current index set.
 
template<std::forward_iterator It, std::sentinel_for< It > End>
constexpr void overrideIndices (It begin, End end, bool do_sort=true, bool do_unique=true)
 Replace the current index set with the indices in [begin, end).
 
constexpr size_type index () const
 Returns the zero-based number of the index set currently being filled.
 
constexpr size_type size () const
 Returns the number of distinct indices inserted into the current index set so far.
 
constexpr IndexRangeBuilder & operator* ()
 Dereference — returns a reference to this IndexRangeBuilder itself (enables range-for).
 

Friends

class BCRSMatrix
 

Detailed Description

template<class B, class I = uint_least32_t, class A = std::allocator<B>>
class Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator

Row-wise build API.

An iterator for row-wise construction of the matrix.

Constructor & Destructor Documentation

◆ CreateIterator()

template<class B , class I , class A >
Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator::CreateIterator ( CreateIterator &&  other)
noexcept

Move-construct from another iterator.

Member Function Documentation

◆ contains()

template<class A >
constexpr bool Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::contains ( index_type  j) const
constexprinherited

Returns true if index j has already been inserted into the current index set.

◆ index()

template<class A >
constexpr auto Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::index ( ) const
constexprinherited

Returns the zero-based number of the index set currently being filled.

◆ insert()

template<class A >
constexpr void Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::insert ( index_type  j)
constexprinherited

Insert index j into the current index set. Duplicate insertions are silently ignored.

◆ operator*()

template<class A >
constexpr auto Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::operator* ( )
constexprinherited

Dereference — returns a reference to this IndexRangeBuilder itself (enables range-for).

◆ operator++()

template<class B , class I , class A >
auto Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator::operator++ ( )

Advance to the next row; when the last row is completed, finalize the matrix.

◆ operator=()

template<class B , class I , class A >
auto Dune::Experimental::BCRSMatrix< B, I, A >::CreateIterator::operator= ( CreateIterator &&  other)
noexcept

Move-assign from another iterator.

◆ overrideIndices()

template<class A >
template<std::forward_iterator It, std::sentinel_for< It > End>
constexpr void Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::overrideIndices ( It  begin,
End  end,
bool  do_sort = true,
bool  do_unique = true 
)
constexprinherited

Replace the current index set with the indices in [begin, end).

This overwrites any indices previously inserted into the current index set. The provided range is copied into the active storage of the current row and the remainder of that row buffer is reset to the invalid sentinel value, so old entries do not remain observable through contains(), lower_bound(), or later compression.

If the current row buffer is too small, it is grown before the new indices are copied. When do_sort is true, the copied prefix is sorted in ascending order. When do_unique is true, duplicate values are removed from that sorted prefix. The final logical size of the current row is the size after optional sorting and deduplication.

Parameters
beginIterator to the first replacement index.
endSentinel one past the last replacement index.
do_sortWhether to sort the copied indices before storing them.
do_uniqueWhether to remove duplicate indices after the optional sort. This assumes equal elements become adjacent.

◆ size()

template<class A >
constexpr auto Dune::Experimental::SequencedSparseIndexRangeBuilder< A >::IndexRangeBuilder::size ( ) const
constexprinherited

Returns the number of distinct indices inserted into the current index set so far.

Friends And Related Symbol Documentation

◆ BCRSMatrix

template<class B , class I = uint_least32_t, class A = std::allocator<B>>
friend class BCRSMatrix
friend

The documentation for this class was generated from the following file: