Trait rstats::Vecu8

source ·
pub trait Vecu8 {
    // Required methods
    fn pdfu8(self) -> Vec<f64>;
    fn entropyu8(self) -> f64;
    fn jointpdfu8(self, v: &[u8]) -> Result<Vec<Vec<u32>>, RE>;
    fn jointentropyu8(self, v: &[u8]) -> Result<f64, RE>;
    fn dependenceu8(self, v: &[u8]) -> Result<f64, RE>;
    fn independenceu8(self, v: &[u8]) -> Result<f64, RE>;
}
Expand description

Methods specialised to and more efficient, for &[u8]

Required Methods§

source

fn pdfu8(self) -> Vec<f64>

Probability density function of bytes data

source

fn entropyu8(self) -> f64

Information (entropy) of &u8 (in nats)

source

fn jointpdfu8(self, v: &[u8]) -> Result<Vec<Vec<u32>>, RE>

Joint probability density function (here just co-occurence counts) of paired values in two vectors of bytes of the same length. Needs n^2 x 32bits of memory.

source

fn jointentropyu8(self, v: &[u8]) -> Result<f64, RE>

Joint entropy of &u8,&u8 (in nats)

source

fn dependenceu8(self, v: &[u8]) -> Result<f64, RE>

Statistical pairwise dependence of two &[u8] variables in the range [0,1]

source

fn independenceu8(self, v: &[u8]) -> Result<f64, RE>

Independence in the range [1,2] of two &[u8] variables

Implementations on Foreign Types§

source§

impl Vecu8 for &[u8]

source§

fn pdfu8(self) -> Vec<f64>

Probability density function of bytes data

source§

fn entropyu8(self) -> f64

Information (entropy) of &u8 (in nats)

source§

fn jointpdfu8(self, v: &[u8]) -> Result<Vec<Vec<u32>>, RE>

Joint probability density function (here just co-occurence counts) of successive pairs of values from two vectors of bytes of the same lenghts n. Needs 4*256^2=262144 bytes of heap memory, which will be sparse except for long input vectors.

source§

fn jointentropyu8(self, v: &[u8]) -> Result<f64, RE>

Joint entropy of &u8,&u8 (in nats)

source§

fn dependenceu8(self, v: &[u8]) -> Result<f64, RE>

Statistical pairwise dependence in range [0,1] of two &u8 variables returns 0 iff they are statistically pairwise independent returns 1 if they are identical or all values are unique

source§

fn independenceu8(self, v: &[u8]) -> Result<f64, RE>

Independence in the range [1,2] of two &u8 variables e.g. 2 is returned iff they are statistically pairwise independent returns 1 if they are identical or all values are unique

Implementors§