1. 18 Sep, 2020 1 commit
  2. 16 Sep, 2020 3 commits
  3. 14 Sep, 2020 1 commit
  4. 10 Sep, 2020 1 commit
  5. 09 Sep, 2020 1 commit
  6. 08 Sep, 2020 2 commits
  7. 04 Sep, 2020 3 commits
  8. 18 Aug, 2020 5 commits
  9. 11 Aug, 2020 3 commits
  10. 17 Jul, 2020 4 commits
  11. 10 Jul, 2020 4 commits
  12. 09 Jul, 2020 2 commits
  13. 07 Jul, 2020 1 commit
    • Oliver Sander's avatar
      [!834] Add the sparseRange() utility function · 90cbf00f
      Oliver Sander authored
      Merge branch 'feature/sparseRange' into 'master'
      
      ref:core/dune-common\> 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.
      
      See merge request [!834]
      
        [!834]: gitlab.dune-project.org/core/dune-common/merge_requests/834
      90cbf00f
  14. 30 Jun, 2020 2 commits
    • Carsten Gräser's avatar
      Add the sparseRange() utility function · 3a6e9ea0
      Carsten Gräser authored
      This helper allows to use `for`-loops with
      structured bindings for sparse ranges `R`
      whose iterators `it` provide an
      `it->index()` method, like this
      
      ```cpp
      for(auto&& [A_i, i] : sparseRange(R))
        doSomethingWithValueAndIndex(A_i, i);
      ```
      3a6e9ea0
    • Carsten Gräser's avatar
      [!781] Allow iterator based transformations in TransformedRangeView · a6bfcb25
      Carsten Gräser authored
      Merge branch 'feature/extend-transformedrangeview' into 'master'
      
      ref:core/dune-common\> This extends TransformedRangeView by also allowing to
      apply a transformation to the iterator directly. While the (existing) default
      mechanism is to use f(*it) where f is the transformation and it an iterator of
      the wrapped range, the new iterator based transformation uses f(it) instead.
      This allows to incorporate additional information from the iterator in the
      transformation.
      
      Using the new functionality one can e.g. easily implement structured bindings
      support for sparse ranges using
      
          template<class Range>
          auto sparseRange(Range&& range) {
            return Dune::transformedRangeView(std::forward<Range>(range), Dune::taggedCallback<Dune::IteratorTransformationTag>([](auto&& it) {
                return std::tuple<decltype(*it), decltype(it.index())>(*it, it.index());
            }));
          }
      
          ...
      
          for(auto&& [entry,col] :  sparseRange(matrix[row]))
            y[row] += entry*x[col];
      
      Some more implementation details:
      
      -   This adds the TaggedCallback<Tag,F> helper class and the corresponding
          generator function taggedCallback<Tag>(f) for tagging a callback. Using
          this mechanism we can provide additional information on the callback.
      -   If the TransformedRangeView is provided with a callback of type
          TaggedCallback<IteratorTransformation,F>, then it iterator based
          transformation is used.
      
      See merge request [!781]
      
        [!781]: gitlab.dune-project.org/core/dune-common/merge_requests/781
      a6bfcb25
  15. 29 Jun, 2020 5 commits
  16. 28 Jun, 2020 2 commits