Add the sparseRange() utility function
This helper allows to use for
-loops with
structured bindings for sparse ranges R
whose iterators it
provide an
it->index()
method, like this
for(auto&& [A_i, i] : sparseRange(R))
doSomethingWithValueAndIndex(A_i, i);
This also adds a test and fixes the placement of the range-utilities in the appropriate doxygen group to make them easier to discover.
Merge request reports
Activity
added feature label
This implements
sparseRange
as proposed in !781 (merged).mentioned in merge request !781 (merged)
assigned to @oliver.sander
@carsten.graeser , this one works. The test is at https://gitlab.mn.tu-dresden.de/paraphase/dune-fracture-phasefields/-/merge_requests/20 .
mentioned in commit 90cbf00f
Please register or sign in to reply