sarah-ek / faer-rs

Linear algebra foundation for the Rust programming language

Home Page:https://faer-rs.github.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`MulAssign<E: Entity>`

DJDuque opened this issue · comments

Is your feature request related to a problem? Please describe.
I have a x: Mat<f64> and an n: f64and I need to update x = n * x.

Describe the solution you'd like
I think it would be convenient to implement the MulAssign trait such that we can do x *= n and it reuses the memory allocated for x.

Describe alternatives you've considered
Maybe it would be good to have a generic map_with method that transforms all the elements of a matrix in place. It could be used to implement this MulAssign trait, and it would probably be useful for other things as well.

Closed with PR #49