Trait rstats::Vecu8 [−][src]
pub trait Vecu8 {}Show methods
fn smult(self, s: f64) -> Vec<f64>; fn sadd(self, s: f64) -> Vec<f64>; fn dotp(self, v: &[f64]) -> f64; fn dotpu8(self, v: &[u8]) -> u64; fn cosine(self, v: &[f64]) -> f64; fn cosineu8(self, v: &[u8]) -> f64; fn vsub(self, v: &[f64]) -> Vec<f64>; fn vsubu8(self, v: &[u8]) -> Vec<f64>; fn vadd(self, v: &[u8]) -> Vec<f64>; fn vmag(self) -> f64; fn vmagsq(self) -> f64; fn vdist(self, v: &[f64]) -> f64; fn vdistu8(self, v: &[u8]) -> f64; fn vdistsq(self, v: &[u8]) -> u64; fn vsim(self, v: &[f64]) -> f64; fn vdisim(self, v: &[f64]) -> f64; fn varc(self, v: &[f64]) -> f64; fn pdf(self) -> Vec<f64>; fn entropy(self) -> f64; fn jointpdf(self, v: &[u8]) -> Vec<Vec<u32>>; fn jointentropy(self, v: &[u8]) -> f64; fn dependence(self, v: &[u8]) -> f64; fn vecu8asvecf64(self) -> Vec<f64>;
Expand description
Some support for Vec
Required methods
fn vdisim(self, v: &[f64]) -> f64
[src]
fn vdisim(self, v: &[f64]) -> f64
[src]We define vector dissimilarity D in the interval [0,1]: D = 1-S = (1-cos(theta))/2
fn vecu8asvecf64(self) -> Vec<f64>
[src]
fn vecu8asvecf64(self) -> Vec<f64>
[src]cast vector of u8s to vector of f64s
Implementations on Foreign Types
impl Vecu8 for &[u8]
[src]
impl Vecu8 for &[u8]
[src]fn dotp(self, v: &[f64]) -> f64
[src]
fn dotp(self, v: &[f64]) -> f64
[src]Scalar product.
Must be of the same length - no error checking (for speed)
fn dotpu8(self, v: &[u8]) -> u64
[src]
fn dotpu8(self, v: &[u8]) -> u64
[src]Scalar product of two (positive) u8 slices.
Must be of the same length - no error checking (for speed)
fn vsubu8(self, v: &[u8]) -> Vec<f64>
[src]
fn vsubu8(self, v: &[u8]) -> Vec<f64>
[src]Vector subtraction (converts results to f64 as they can be negative)
fn vadd(self, v: &[u8]) -> Vec<f64>
[src]
fn vadd(self, v: &[u8]) -> Vec<f64>
[src]Vector addition ( converts results to f64, as they can exceed 255 )
fn vdistsq(self, v: &[u8]) -> u64
[src]
fn vdistsq(self, v: &[u8]) -> u64
[src]Euclidian distance squared, the arguments are both of &u8 type
fn vsim(self, v: &[f64]) -> f64
[src]
fn vsim(self, v: &[f64]) -> f64
[src]We define vector similarity S in the interval [0,1] as S = (1+cos(theta))/2
fn vdisim(self, v: &[f64]) -> f64
[src]
fn vdisim(self, v: &[f64]) -> f64
[src]We define vector dissimilarity D in the interval [0,1] as D = 1-S = (1-cos(theta))/2
fn jointpdf(self, v: &[u8]) -> Vec<Vec<u32>>
[src]
fn jointpdf(self, v: &[u8]) -> Vec<Vec<u32>>
[src]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. Do not use for very long vectors, those need hashing implementation.