Trait concrete_commons::dispersion::DispersionParameter [−][src]
pub trait DispersionParameter: Copy {
fn get_standard_dev(&self) -> f64;
fn get_variance(&self) -> f64;
fn get_log_standard_dev(&self) -> f64;
fn get_modular_standard_dev<Uint>(&self) -> f64
where
Uint: UnsignedInteger;
fn get_modular_variance<Uint>(&self) -> f64
where
Uint: UnsignedInteger;
fn get_modular_log_standard_dev<Uint>(&self) -> f64
where
Uint: UnsignedInteger;
}
Expand description
A trait for types representing distribution parameters, for a given unsigned integer type.
Required methods
fn get_standard_dev(&self) -> f64
fn get_standard_dev(&self) -> f64
Returns the standard deviation of the distribution, i.e. $\sigma = 2^p$.
fn get_variance(&self) -> f64
fn get_variance(&self) -> f64
Returns the variance of the distribution, i.e. $\sigma^2 = 2^{2p}$.
fn get_log_standard_dev(&self) -> f64
fn get_log_standard_dev(&self) -> f64
Returns base 2 logarithm of the standard deviation of the distribution, i.e. $\log_2(\sigma)=p$
fn get_modular_standard_dev<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
fn get_modular_standard_dev<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
For a Uint
type representing $\mathbb{Z}/2^q\mathbb{Z}$, we return $2^{q-p}$.
fn get_modular_variance<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
fn get_modular_variance<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
For a Uint
type representing $\mathbb{Z}/2^q\mathbb{Z}$, we return $2^{2(q-p)}$.
fn get_modular_log_standard_dev<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
fn get_modular_log_standard_dev<Uint>(&self) -> f64 where
Uint: UnsignedInteger,
For a Uint
type representing $\mathbb{Z}/2^q\mathbb{Z}$, we return $q-p$.