|
| | 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).
|
| |
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.
template<class A >
template<std::forward_iterator It, std::sentinel_for< It > End>
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
-
| begin | Iterator to the first replacement index. |
| end | Sentinel one past the last replacement index. |
| do_sort | Whether to sort the copied indices before storing them. |
| do_unique | Whether to remove duplicate indices after the optional sort. This assumes equal elements become adjacent. |