Skip to content

Draft: Add a view to raw vector data with `DenseVector` interface

Simon Praetorius requested to merge feature/densevectorview into master

Summary

This MR introduces a span DenseVectorSpan over a consecutive sequence of values with a given number. This span has an interface like a DenseVector and can be used in all the places where a DenseVector is expected, e.g. in DenseMatrix::solve. This allows to wrap non-Dune types like std::vector in the Dune interface. It also would allow to replace the ScalarVectorView since a single scalar value is just a sequence of length 1.

Requirements

Note

A similar span can be easily introduced for matrices. A generalization is already implemented for "tensors" in https://gitlab.dune-project.org/simon.praetorius/dune-tensor/-/blob/main/dune/tensor/tensorspan.hh?ref_type=heads

Edited by Simon Praetorius

Merge request reports

Loading