Trait statrs::statistics::Entropy [] [src]

pub trait Entropy<T> {
    fn entropy(&self) -> T;
}

The Entropy trait specifies an object that has a closed form solution for its entropy

Required Methods

Returns the entropy. May panic depending on the implementor.

Examples

use statrs::statistics::Entropy;
use statrs::distribution::Uniform;

let n = Uniform::new(0.0, 1.0).unwrap();
assert_eq!(0.0, n.entropy());

Implementors