pub enum StatsError {
ComputationError(String),
DomainError(String),
DimensionMismatch(String),
InvalidArgument(String),
NotImplementedError(String),
ConvergenceError(String),
InsufficientData(String),
InvalidInput(String),
NotImplemented(String),
CoreError(CoreError),
DistributionError(String),
}
Expand description
Statistics error type
Variants§
ComputationError(String)
Computation error (generic error)
DomainError(String)
Domain error (input outside valid domain)
DimensionMismatch(String)
Dimension mismatch error
InvalidArgument(String)
Value error (invalid value)
NotImplementedError(String)
Not implemented error
ConvergenceError(String)
Convergence error (algorithm failed to converge)
InsufficientData(String)
Insufficient data error
InvalidInput(String)
Invalid input error
NotImplemented(String)
Not implemented (alias for backwards compatibility)
CoreError(CoreError)
Core error (propagated from scirs2-core)
DistributionError(String)
Random distribution error
Implementations§
Source§impl StatsError
impl StatsError
Sourcepub fn computation<S: Into<String>>(message: S) -> Self
pub fn computation<S: Into<String>>(message: S) -> Self
Create a computation error with context
Sourcepub fn dimension_mismatch<S: Into<String>>(message: S) -> Self
pub fn dimension_mismatch<S: Into<String>>(message: S) -> Self
Create a dimension mismatch error with context
Sourcepub fn invalid_argument<S: Into<String>>(message: S) -> Self
pub fn invalid_argument<S: Into<String>>(message: S) -> Self
Create an invalid argument error with context
Sourcepub fn not_implemented<S: Into<String>>(message: S) -> Self
pub fn not_implemented<S: Into<String>>(message: S) -> Self
Create a not implemented error with context
Sourcepub fn insufficientdata<S: Into<String>>(message: S) -> Self
pub fn insufficientdata<S: Into<String>>(message: S) -> Self
Create an insufficient data error with context
Sourcepub fn invalid_input<S: Into<String>>(message: S) -> Self
pub fn invalid_input<S: Into<String>>(message: S) -> Self
Create an invalid input error with context
Sourcepub fn with_suggestion(&self) -> String
pub fn with_suggestion(&self) -> String
Add recovery suggestions based on error type
Trait Implementations§
Source§impl Clone for StatsError
impl Clone for StatsError
Source§fn clone(&self) -> StatsError
fn clone(&self) -> StatsError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for StatsError
impl Debug for StatsError
Source§impl Display for StatsError
impl Display for StatsError
Source§impl Error for StatsError
impl Error for StatsError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for StatsError
impl RefUnwindSafe for StatsError
impl Send for StatsError
impl Sync for StatsError
impl Unpin for StatsError
impl UnwindSafe for StatsError
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.