sarah-ek / faer-rs

Linear algebra foundation for the Rust programming language
https://faer-rs.github.io
MIT License
1.79k stars 58 forks source link

A specialized Diagonal type? #69

Closed safasofuoglu closed 10 months ago

safasofuoglu commented 11 months ago

I'm frequently using matrix-diagonal and diagonal-diagonal multiplication (which is a component-wise vector mul). Since populating a matrix with a diagonal does lead to wasted performance, I'm using a modified copy of div_by_s I found in faer source.

Does it make sense to flesh out a Diagonal type?

sarah-ek commented 11 months ago

it would be nice to have such a type, but i need to figure out a way to handle all the combinations of operators that scales well.

sarah-ek commented 10 months ago

included in v0.14.0