This crate contains types and traits to manipulate numeric types in a generic manner in the
concrete
library.
It also contains traits and structures to handle the computation of variance, standard deviation, etc.
For instance, in the standard library, the f32
and f64
trait share a lot of methods of the
same name and same semantics. Still, it is not possible to use them generically. This module
provides the [FloatingPoint
] trait, implemented by both of those type, to remedy the
situation. It also provides the [SignedInteger
] and [UnsignedInteger
] traits.
The current implementation of those traits does not strive to be general, in the sense that not all the common methods of the same kind of types are exposed. Only were included the ones that are used in the rest of the library.
The dispersion module deals with noise distribution. When dealing with noise, we tend to use different representation for the same value. In general, the noise is specified by the standard deviation of a gaussian distribution, which is of the form $\sigma = 2^p$, with $p$ a negative integer. Depending on the use case though, we rely on different representations for this quantity:
StandardDev
] type.LogStandardDev
] type.Variance
] type.In any of those cases, the corresponding type implements the DispersionParameter
trait,
which makes if possible to use any of those representations generically when noise must be
defined.