Skip to content
Snippets Groups Projects
  1. Sep 16, 2020
  2. Sep 14, 2020
  3. Sep 10, 2020
  4. Sep 09, 2020
  5. Sep 08, 2020
  6. Sep 04, 2020
  7. Aug 18, 2020
  8. Aug 11, 2020
  9. Jul 17, 2020
  10. Jul 10, 2020
  11. Jul 09, 2020
  12. Jul 07, 2020
    • 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 [core/dune-common!834]
      
        [core/dune-common!834]: gitlab.dune-project.org/core/dune-common/merge_requests/834
      90cbf00f
  13. Jun 30, 2020
    • 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 [core/dune-common!781]
      
        [core/dune-common!781]: gitlab.dune-project.org/core/dune-common/merge_requests/781
      a6bfcb25
  14. Jun 29, 2020
  15. Jun 28, 2020
  16. Jun 27, 2020
Loading