sparsemat / sprs

sparse linear algebra library for rust
Apache License 2.0
386 stars 45 forks source link

impl approx #210

Closed mulimoen closed 4 years ago

mulimoen commented 4 years ago

This implements approx for sparse vectors and matrices. This can be very useful for comparing matrices, as the PartialEq checks for structural equality, and the approx traits "ignore" the storage type.

Fixes #197

mulimoen commented 4 years ago

By placing the traits in a module in the toplevel we can squeeze some documentation in. If one clicks the trait implementation AbsDiffEq one gets redirected to sprs::approx::AbsDiffEq, and sprs::approx got the information regarding performance.

Alternatively one can also directly import the traits and add a doc string, but these docs will be above the trait item explanation, which makes it a bit odd...

mulimoen commented 4 years ago

Maybe we should add some metadata for docs.rs to have all features enabled and visible in the docs?

vbarrielle commented 4 years ago

Yes that's a good idea, I've filed it in #215.