-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
How should we define the scalar trait? I'd like to keep it very general. It would be cool for example to support operators over finite fields, etc.
The Num create provides a fairly generic numerical trait: https://docs.rs/num-traits/latest/num_traits/trait.Num.html.
However, this still requires a bit too much (e.g. it has string conversion and NumOps has remainder computations).
What do we minimally want to support for scalar fields? Initial suggestions:
- A Zero element
- A One element
- Addition
- Multiplication
- Divison
- PartialEq
Should we have less or more?
Also, it may be useful to have a separate complex trait that implements the above operations but whose real and imaginary parts are again numerical traits with the above property.