pub enum HmcError {
NonFiniteState {
reason: String,
},
InvalidConfig {
reason: String,
},
DimensionMismatch {
reason: String,
},
FirthUnsupported {
reason: String,
},
LinkMismatch {
reason: String,
},
UnsupportedFamily {
reason: String,
},
SamplingFailed {
reason: String,
},
}Expand description
Typed error variants for the HMC / NUTS sampling module.
External-facing helpers in this module continue to return
Result<_, String>; this enum is materialized internally and converted
at the public boundary via .map_err(String::from) so that the error
text remains byte-identical to the previous format! output.
Variants§
NonFiniteState
Sampler state (penalty / Hessian / mode / posterior values) contains NaN or Inf where finiteness is required.
InvalidConfig
Configuration value (e.g. target_accept, unit-weight requirement)
is out of range or otherwise invalid.
DimensionMismatch
Dimensions of the supplied matrices / vectors are inconsistent.
FirthUnsupported
Firth/Jeffreys correction was requested for a family that does not support it.
LinkMismatch
Inverse-link state does not match the requested likelihood family in the joint (β, ρ) sampler.
UnsupportedFamily
Likelihood family is not implemented in the current sampling path.
SamplingFailed
Sampling produced no usable output (empty kept set, non-finite summary statistic, etc.).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for HmcError
impl RefUnwindSafe for HmcError
impl Send for HmcError
impl Sync for HmcError
impl Unpin for HmcError
impl UnsafeUnpin for HmcError
impl UnwindSafe for HmcError
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
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>
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>
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
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.