use crate::errors::EmptyInput;
use ndarray::{Data, Dimension};
use num_traits::{Float, FromPrimitive, Zero};
use std::ops::{Add, Div};
pub trait SummaryStatisticsExt<A, S, D>
where
S: Data<Elem = A>,
D: Dimension,
{
fn mean(&self) -> Result<A, EmptyInput>
where
A: Clone + FromPrimitive + Add<Output = A> + Div<Output = A> + Zero;
fn harmonic_mean(&self) -> Result<A, EmptyInput>
where
A: Float + FromPrimitive;
fn geometric_mean(&self) -> Result<A, EmptyInput>
where
A: Float + FromPrimitive;
fn kurtosis(&self) -> Result<A, EmptyInput>
where
A: Float + FromPrimitive;
fn skewness(&self) -> Result<A, EmptyInput>
where
A: Float + FromPrimitive;
fn central_moment(&self, order: u16) -> Result<A, EmptyInput>
where
A: Float + FromPrimitive;
fn central_moments(&self, order: u16) -> Result<Vec<A>, EmptyInput>
where
A: Float + FromPrimitive;
private_decl! {}
}
mod means;