dimforge / dimforge/nalgebra

Less strong trait bounds for algorithms

Open
#1,474 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
565
PR merge metrics
No merged PRs in 30d

Description

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](https://docs.rs/rug/latest/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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.