pub enum CubatureBuildError {
SigmaGridMismatch {
expected: usize,
actual: usize,
},
ZeroIsotopes,
ZeroTrainingDensities,
TrainingDensityLength {
expected: usize,
actual: usize,
index: usize,
},
AnchorLength {
expected: usize,
actual: usize,
},
LpInfeasible {
row: usize,
},
}Expand description
Errors from SparseEmpiricalCubaturePlan construction.
Variants§
SigmaGridMismatch
Flat sigmas storage has the wrong total element count.
sigmas is stored row-major as sigmas[j * n_rows + ℓ] = σ_j(E'_ℓ), so the expected total length is k * n_rows.
ZeroIsotopes
Zero isotopes supplied — the cubature has no meaning for k = 0.
ZeroTrainingDensities
Zero training densities supplied — the LP construction requires at least one forward feature per row.
TrainingDensityLength
A training density vector has a length different from the isotope count.
Fields
AnchorLength
The Jacobian anchor density has a length different from the isotope count.
LpInfeasible
The row-wise LP failed to produce a feasible solution. Should never fire on a well-formed problem because the uniform (non-sparse) weight is always feasible; if it does, it signals a numerical degeneracy (e.g., identical atoms in the row support) worth investigating.
Trait Implementations§
Source§impl Debug for CubatureBuildError
impl Debug for CubatureBuildError
Source§impl Display for CubatureBuildError
impl Display for CubatureBuildError
Source§impl Error for CubatureBuildError
impl Error for CubatureBuildError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for CubatureBuildError
impl RefUnwindSafe for CubatureBuildError
impl Send for CubatureBuildError
impl Sync for CubatureBuildError
impl Unpin for CubatureBuildError
impl UnsafeUnpin for CubatureBuildError
impl UnwindSafe for CubatureBuildError
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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 more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.