pub enum BasisError {
Show 20 variants
InvalidDegree(usize),
InsufficientDegreeForDerivative {
degree: usize,
derivative_order: usize,
minimum_degree: usize,
},
InvalidRange(f64, f64),
DegenerateRange(usize),
InvalidPenaltyOrder {
order: usize,
num_basis: usize,
},
InsufficientKnotsForDegree {
degree: usize,
required: usize,
provided: usize,
},
InsufficientColumnsForConstraint {
found: usize,
},
ConstraintMatrixRowMismatch {
basisrows: usize,
constraintrows: usize,
},
WeightsDimensionMismatch {
expected: usize,
found: usize,
},
LinalgError(FaerLinalgError),
ConstraintNullspaceCollapsed {
site: &'static str,
cross_rank: usize,
coeff_dim: usize,
cross_frobenius: f64,
gram_spectrum: String,
},
DegenerateKnots,
InvalidKnotVector(String),
SparseCreation(String),
DimensionMismatch(String),
IndefinitePenalty {
context: String,
min_eigenvalue: f64,
tolerance: f64,
guidance: String,
},
InvalidInput(String),
DegenerateAtCollision {
kernel: &'static str,
dim: usize,
m: f64,
message: &'static str,
},
DuchonSmoothnessInsufficient {
operator: String,
margin: usize,
spectral_order: f64,
dimension: usize,
nullspace_order: usize,
power: f64,
minimum_power: usize,
},
Other(String),
}Expand description
Re-export of the neutral basis-error contract. #1521: BasisError lives
in gam-problem so EstimationError can wrap it (#[from]) without a
back-edge; gam-terms re-exports it to preserve gam_terms::basis::BasisError.
A comprehensive error type for all operations within the basis module.
Variants§
InvalidDegree(usize)
InsufficientDegreeForDerivative
InvalidRange(f64, f64)
DegenerateRange(usize)
InvalidPenaltyOrder
InsufficientKnotsForDegree
InsufficientColumnsForConstraint
ConstraintMatrixRowMismatch
WeightsDimensionMismatch
LinalgError(FaerLinalgError)
ConstraintNullspaceCollapsed
Fields
gram_spectrum: StringPre-formatted constrained-Gram spectrum summary. The structural
early-return sites bail at the cross-rank check before the Gram is
ever eigendecomposed, so they report not computed rather than a
misleading NaN; only the spectral-rank-deficiency site fills in real
max/min eigenvalues and tolerance.
DegenerateKnots
InvalidKnotVector(String)
SparseCreation(String)
DimensionMismatch(String)
IndefinitePenalty
InvalidInput(String)
DegenerateAtCollision
DuchonSmoothnessInsufficient
A Duchon spline is not smooth enough for an operator a fit path applies
to its radial kernel: the kernel’s spectral order 2(p+s) must exceed
the covariate dimension by margin for that operator to be finite at
the origin.
Fields
Other(String)
Implementations§
Source§impl BasisError
impl BasisError
Sourcepub fn duchon_smoothness_insufficient(
operator: impl Into<String>,
margin: usize,
dimension: usize,
nullspace_order: usize,
power: f64,
) -> BasisError
pub fn duchon_smoothness_insufficient( operator: impl Into<String>, margin: usize, dimension: usize, nullspace_order: usize, power: f64, ) -> BasisError
The typed Duchon smoothness refusal for operator, computing the
smallest admitting power from the same inequality that refused.
Trait Implementations§
Source§impl Debug for BasisError
impl Debug for BasisError
Source§impl Display for BasisError
impl Display for BasisError
Source§impl Error for BasisError
impl Error for BasisError
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()
Source§impl From<BasisError> for EstimationError
impl From<BasisError> for EstimationError
Source§fn from(source: BasisError) -> EstimationError
fn from(source: BasisError) -> EstimationError
Source§impl From<FaerLinalgError> for BasisError
impl From<FaerLinalgError> for BasisError
Source§fn from(source: FaerLinalgError) -> BasisError
fn from(source: FaerLinalgError) -> BasisError
Auto Trait Implementations§
impl Freeze for BasisError
impl RefUnwindSafe for BasisError
impl Send for BasisError
impl Sync for BasisError
impl Unpin for BasisError
impl UnsafeUnpin for BasisError
impl UnwindSafe for BasisError
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> 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.