linalg-rs / sandbox

An experimental repository to test Rust linear algebra traits
Apache License 2.0
0 stars 0 forks source link

Vector implementation #10

Closed tbetcke closed 1 year ago

tbetcke commented 1 year ago

A first version of implementing a concrete vector type within the function space framework.

We have a LocalndexableVector type, which provides a basic implementation of a vector (still a lot of methods to be added).

The function space is a LocalndexableSpace. This can create vectors of type LocalIndexableSpaceElement. These are simply wrappers around LocalIndexableVector that additionally contain a back reference to the underlying space and ensure that their lifetime cannot outlive the lifetime of the function space.

Calling view on a LocalIndexableSpaceElement returns a reference to a LocalIndexableVector from which all the usual operations are then accessible.

Under sparse-core/examples there is a vector.rs example file, which demonstrates that for the user all of this is completely opaque. They create a function space and from that can create vectors and operate on them.

Before merging need