pub struct RobustArrayOps;Expand description
Robust numerical operations for arrays
Implementations§
Source§impl RobustArrayOps
impl RobustArrayOps
Sourcepub fn robust_sum<T: Float + FromPrimitive>(arr: &Array1<T>) -> T
pub fn robust_sum<T: Float + FromPrimitive>(arr: &Array1<T>) -> T
Robust sum that handles numerical precision issues
Sourcepub fn robust_mean<T: Float + FromPrimitive>(arr: &Array1<T>) -> UtilsResult<T>
pub fn robust_mean<T: Float + FromPrimitive>(arr: &Array1<T>) -> UtilsResult<T>
Robust mean calculation
Sourcepub fn robust_variance<T: Float + FromPrimitive>(
arr: &Array1<T>,
ddof: usize,
) -> UtilsResult<T>
pub fn robust_variance<T: Float + FromPrimitive>( arr: &Array1<T>, ddof: usize, ) -> UtilsResult<T>
Robust variance calculation
Sourcepub fn robust_std<T: Float + FromPrimitive>(
arr: &Array1<T>,
ddof: usize,
) -> UtilsResult<T>
pub fn robust_std<T: Float + FromPrimitive>( arr: &Array1<T>, ddof: usize, ) -> UtilsResult<T>
Robust standard deviation calculation
Sourcepub fn robust_dot<T: Float + FromPrimitive>(
a: &Array1<T>,
b: &Array1<T>,
) -> UtilsResult<T>
pub fn robust_dot<T: Float + FromPrimitive>( a: &Array1<T>, b: &Array1<T>, ) -> UtilsResult<T>
Robust dot product
Sourcepub fn robust_norm<T: Float + FromPrimitive>(arr: &Array1<T>) -> UtilsResult<T>
pub fn robust_norm<T: Float + FromPrimitive>(arr: &Array1<T>) -> UtilsResult<T>
Robust norm calculation (Euclidean norm with overflow protection)
Auto Trait Implementations§
impl Freeze for RobustArrayOps
impl RefUnwindSafe for RobustArrayOps
impl Send for RobustArrayOps
impl Sync for RobustArrayOps
impl Unpin for RobustArrayOps
impl UnwindSafe for RobustArrayOps
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more