Expand description
Numerical type definitions.
Numeric
together with where for<'a> &'a T: NumericRef<T>
expresses the operations in NumericByValue
for
all 4 combinations of by value and by reference. Numeric
additionally adds some additional constraints only needed by value on an implementing
type such as PartialOrd
, ZeroOne
and
FromUsize
.
For additional operations for real valued numbers see Real
Modules§
- extra
- Additional traits for more complex numerical operations on real numbers.
Traits§
- From
Usize - Specifies how to obtain an instance of this numeric type
equal to the usize primitive. If the number is too large to
represent in this type,
None
should be returned instead. - Numeric
- A general purpose numeric trait that defines all the behaviour numerical matrices need their types to support for math operations.
- Numeric
ByValue - A trait defining what a numeric type is in terms of by value numerical operations matrices need their types to support for math operations.
- Numeric
Ref - The trait to define
&T op T
and&T op &T
versions for NumericByValue based off the MIT/Apache 2.0 licensed code from num-traits 0.2.10: - ZeroOne
- A trait defining how to obtain 0 and 1 for every implementing type.