GuillaumeGomez / rust-GSL

A GSL (the GNU Scientific Library) binding for Rust
190 stars 46 forks source link

Initial work on a `Vector` trait #153

Open Chris00 opened 5 months ago

Chris00 commented 5 months ago

As discussed in https://github.com/GuillaumeGomez/rust-GSL/issues/147, here is some preliminary work on the introduction of a Vector trait (for fit and cblas::level1). (It is better to have early feedback before doing more work! In particular a Stride trait must be developed to be able to add strides to any Vector container.)

Note that, as added benefits, the equality of lengths of inputs is now checked (no way of specifying a longer length than allocated) and complex numbers are handled correctly (and in a compatible way with their Rust standard representation).

GuillaumeGomez commented 5 months ago

Looks great to me! I'm not personally a user of this crate, so maybe try to check around you or in the community what they think about it?

Chris00 commented 4 months ago

The code now triggers lots of “transmute used without annotations” which are unrelated to my changes.

There is still quite a bit of work to do (there are still stride which are unchecked).