dimforge / nalgebra

Linear algebra library for Rust.
https://nalgebra.org
Apache License 2.0
4.04k stars 485 forks source link

Scaling a Matrix by its undlying field. #1463

Open Leonhard-Moske opened 1 week ago

Leonhard-Moske commented 1 week ago

The class nalgebra::base::matrix::Matrix implements a function scale which can scale every entry with a real variable. In my case I want to scale the matrix with its underlying field (in my case a complex number). The best/convenient way I found to do that is to create an identity matrix and multiply both of them, but this seems very expensive. Is there a reason why scale only supprots real fields and not the type T of the matrix?