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
Hello, I would like to use nalgebra for my project, however one thing that prevents me from that (and which also confuses me) is that all the e.g. matrix algorithms (QR, SVD, ...) require the base type to implement ComplexField.
But this trait is huge, requiring to implement sin, exp, acosh and what not. It also has a lot of supertraits. I guess those linear algebra algorithms never use those trigonometric methods, also also don't need all the supertraits, so why are the requirements so strong? Couldn't there be a trait with less strong requirements?
I want to use nalgebra together with arbitrary-precision floats, like the ones from rug. I would argue this is a quite common/important use case, but the huge trait ComplexField which is difficult to implement poses a significant barrier for that.
Requiring only the exact operations used has other drawbacks: it leads to more complex trait bounds, slower compilation, and leaks implementation details in a way that is highly prone to breaking changes. Perhaps there's a sweet spot in between somewhere (promising not to use hyperbolic trigonometry in most algorithms probably isn't a maintenance hazard), but some careful analysis and design would be required to capitalize on that.
Hello, I would like to use nalgebra for my project, however one thing that prevents me from that (and which also confuses me) is that all the e.g. matrix algorithms (QR, SVD, ...) require the base type to implement
ComplexField
.But this trait is huge, requiring to implement sin, exp, acosh and what not. It also has a lot of supertraits. I guess those linear algebra algorithms never use those trigonometric methods, also also don't need all the supertraits, so why are the requirements so strong? Couldn't there be a trait with less strong requirements?
I want to use nalgebra together with arbitrary-precision floats, like the ones from rug. I would argue this is a quite common/important use case, but the huge trait
ComplexField
which is difficult to implement poses a significant barrier for that.Other people had the same problem: https://stackoverflow.com/questions/73871027/use-nalgebra-with-float-types-from-rug
The text was updated successfully, but these errors were encountered: