You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is currently not possible to multiply a complex matrix with a complex scalar from the left, as illustrated here:
use nalgebra::{Complex,Matrix2};fnmain(){let mat = Matrix2::<Complex<f32>>::identity();let c = Complex::<f32>::new(1.0, -1.0);let product = mat * c;// This workslet product = c * mat;// This does not compile}
I suspect this is because Complex might be an external type. Is there a way to fix this currently or is it not possible? It is not a huge issue since you can always swap the multiplication order, but it is annoying.
The text was updated successfully, but these errors were encountered:
I think historically this was the case but this might no longer be true, as it's now fine to write impl X<...> for Y as long as X contains one locally-defined type constraining it -- there is an impl for Mul<f32> for Vector2<f32> so I don't see why this wouldn't be possible. I can take a look.
Hi there,
It is currently not possible to multiply a complex matrix with a complex scalar from the left, as illustrated here:
I suspect this is because
Complex
might be an external type. Is there a way to fix this currently or is it not possible? It is not a huge issue since you can always swap the multiplication order, but it is annoying.The text was updated successfully, but these errors were encountered: