sparsemat / sprs

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

Add `diag` method to CsMatBase #253

Closed matzhaugen closed 3 years ago

matzhaugen commented 3 years ago

A method to add fetching the diagonal of a matrix.

I'm quite new to Rust, so I'm not sure if this useful. It's intended to spark a discussion around the implementation. I really wanted the a diag_view method, but I'm not sure how to implement it, so ideas are welcome.

vbarrielle commented 3 years ago

Hello, and thanks for contributing this feature! I'll try and review it soon.

matzhaugen commented 3 years ago

Should I bump the package version and add a changelog btw?

vbarrielle commented 3 years ago

Should I bump the package version and add a changelog btw?

Not on this branch, this branch has breaking changes preparing for a 0.10 version. I will backport your changes to the 0.9 branch and issue a minor release.

vbarrielle commented 3 years ago

@matzhaugen I've published version 0.9.3 on crates.io

There is now a v0.9 branch that can be used to backport these kind of changes to 0.9 while we continue iterating on 0.10.

matzhaugen commented 3 years ago

Sounds good!