pub enum BSplineKnotSpec {
Generate {
data_range: (f64, f64),
num_internal_knots: usize,
},
PeriodicUniform {
data_range: (f64, f64),
num_basis: usize,
},
Automatic {
num_internal_knots: Option<usize>,
placement: BSplineKnotPlacement,
},
Provided(Array1<f64>),
NaturalCubicRegression {
knots: Array1<f64>,
},
}Expand description
Which knot strategy to use for 1D B-spline bases.
Variants§
Generate
PeriodicUniform
Uniform cyclic B-spline basis on [data_range.0, data_range.1).
The first and last endpoints are identified, so evaluating at x and
x + m * period gives identical rows. num_basis is the number of
periodic control sites around the loop and must be at least
degree + 1 for an unaliased local support stencil.
Automatic
Provided(Array1<f64>)
NaturalCubicRegression
Natural cubic regression spline (bs="cr"/"cs") knot set (#1074).
Unlike the open-spline variants above, these knots are the k
Lancaster–Salkauskas knots x*_1 < … < x*_k that directly index the
basis values β_i = f(x*_i) — the basis dimension equals knots.len()
(not knots.len() - degree - 1). The 1-D builder routes this variant to
the cubic-regression builder; the cr identity therefore round-trips
through freeze/reload by virtue of the variant itself (no separate
metadata marker is required), and tensor margins inherit cr by carrying
this knotspec into build_bspline_basis_1d.
Trait Implementations§
Source§impl Clone for BSplineKnotSpec
impl Clone for BSplineKnotSpec
Source§fn clone(&self) -> BSplineKnotSpec
fn clone(&self) -> BSplineKnotSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BSplineKnotSpec
impl Debug for BSplineKnotSpec
Source§impl<'de> Deserialize<'de> for BSplineKnotSpec
impl<'de> Deserialize<'de> for BSplineKnotSpec
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BSplineKnotSpec
impl RefUnwindSafe for BSplineKnotSpec
impl Send for BSplineKnotSpec
impl Sync for BSplineKnotSpec
impl Unpin for BSplineKnotSpec
impl UnsafeUnpin for BSplineKnotSpec
impl UnwindSafe for BSplineKnotSpec
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.