sparsemat / sprs

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

Add approx traits #197

Closed mulimoen closed 4 years ago

mulimoen commented 4 years ago

It would be nice if the sparse matrices support the traits from approx, which allows checking whether two matrices containing floats are approximately equal. This to aid in testing of code, both internally in this crate and outside.

vbarrielle commented 4 years ago

That would be nice indeed. I guess there would first be a structure check, and then a check to see if the norm of the difference between the data vectors is small enough.