pub enum BayesError {
InvalidParameter {
message: String,
},
NumericalError {
message: String,
},
ConvergenceError {
message: String,
},
DimensionMismatch {
expected: usize,
actual: usize,
},
InvalidConfiguration {
message: String,
},
SamplingError {
message: String,
},
}
Expand description
Main error type for the library
Variants§
InvalidParameter
Invalid parameter values
NumericalError
Numerical computation errors
ConvergenceError
Convergence failure
DimensionMismatch
Dimension mismatch errors
InvalidConfiguration
Invalid configuration
SamplingError
Sampling errors
Implementations§
Source§impl BayesError
impl BayesError
Sourcepub fn invalid_parameter(message: impl Into<String>) -> Self
pub fn invalid_parameter(message: impl Into<String>) -> Self
Create a new InvalidParameter error
Sourcepub fn numerical_error(message: impl Into<String>) -> Self
pub fn numerical_error(message: impl Into<String>) -> Self
Create a new NumericalError
Sourcepub fn convergence_error(message: impl Into<String>) -> Self
pub fn convergence_error(message: impl Into<String>) -> Self
Create a new ConvergenceError
Sourcepub fn dimension_mismatch(expected: usize, actual: usize) -> Self
pub fn dimension_mismatch(expected: usize, actual: usize) -> Self
Create a new DimensionMismatch error
Sourcepub fn invalid_configuration(message: impl Into<String>) -> Self
pub fn invalid_configuration(message: impl Into<String>) -> Self
Create a new InvalidConfiguration error
Sourcepub fn sampling_error(message: impl Into<String>) -> Self
pub fn sampling_error(message: impl Into<String>) -> Self
Create a new SamplingError
Trait Implementations§
Source§impl Clone for BayesError
impl Clone for BayesError
Source§fn clone(&self) -> BayesError
fn clone(&self) -> BayesError
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for BayesError
impl Debug for BayesError
Source§impl Display for BayesError
impl Display for BayesError
Source§impl Error for BayesError
impl Error for BayesError
1.30.0 · 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()
Source§impl PartialEq for BayesError
impl PartialEq for BayesError
impl StructuralPartialEq for BayesError
Auto Trait Implementations§
impl Freeze for BayesError
impl RefUnwindSafe for BayesError
impl Send for BayesError
impl Sync for BayesError
impl Unpin for BayesError
impl UnwindSafe for BayesError
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<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.