pub enum VariogramModel {
Spherical {
nugget: Real,
sill: Real,
range: Real,
},
Exponential {
nugget: Real,
sill: Real,
range: Real,
},
Gaussian {
nugget: Real,
sill: Real,
range: Real,
},
Cubic {
nugget: Real,
sill: Real,
range: Real,
},
Stable {
nugget: Real,
sill: Real,
range: Real,
alpha: Real,
},
Matern {
nugget: Real,
sill: Real,
range: Real,
nu: Real,
},
Power {
nugget: Real,
slope: Real,
exponent: Real,
},
HoleEffect {
nugget: Real,
sill: Real,
range: Real,
},
}Expand description
Parametric variogram (nugget, sill, range, and optional shape).
Build with VariogramModel::new from a VariogramType; use with
OrdinaryKrigingModel::new or
BinomialKrigingModel::new.
Variants§
Spherical
Exponential
Gaussian
Cubic
Stable
Matern
Power
Unbounded power-law model γ(h) = nugget + slope·h^exponent, exponent ∈ (0, 2).
sill and range fields carry slope and exponent respectively so that the rest
of the library can treat VariogramModel uniformly via params.
Note: for the power model, sill is not a true plateau — it is reused as the slope
coefficient. Use new_power for a named constructor.
HoleEffect
Hole-effect model with a pseudo-periodic dip; bounded above by sill.
Implementations§
Source§impl VariogramModel
impl VariogramModel
Sourcepub fn new(
nugget: Real,
sill: Real,
range: Real,
model_type: VariogramType,
) -> Result<Self, KrigingError>
pub fn new( nugget: Real, sill: Real, range: Real, model_type: VariogramType, ) -> Result<Self, KrigingError>
Constructs a variogram model with validated parameters: nugget >= 0, sill > nugget, range > 0, all finite.
Sourcepub fn new_power(
nugget: Real,
slope: Real,
exponent: Real,
) -> Result<Self, KrigingError>
pub fn new_power( nugget: Real, slope: Real, exponent: Real, ) -> Result<Self, KrigingError>
Construct a power-law variogram γ(h) = nugget + slope·h^exponent. slope > 0,
exponent ∈ (0, 2), all values finite.
Sourcepub fn new_with_shape(
nugget: Real,
sill: Real,
range: Real,
model_type: VariogramType,
shape: Real,
) -> Result<Self, KrigingError>
pub fn new_with_shape( nugget: Real, sill: Real, range: Real, model_type: VariogramType, shape: Real, ) -> Result<Self, KrigingError>
Constructs a variogram model with an explicit shape parameter for Stable (alpha) or Matérn (nu).
For other model types, shape is ignored. Stable: alpha in (0, 2]. Matérn: nu > 0.
pub fn variogram_type(&self) -> VariogramType
pub fn params(&self) -> (Real, Real, Real)
Sourcepub fn shape(&self) -> Option<Real>
pub fn shape(&self) -> Option<Real>
Shape parameter for Stable (alpha), Matérn (nu), or Power (exponent).
Returns None for 3-parameter bounded models.
Sourcepub fn semivariance(&self, distance: Real) -> Real
pub fn semivariance(&self, distance: Real) -> Real
Semivariance at distance. Assumes distance >= 0 (e.g. from haversine); clamps negative input to 0.
Sourcepub fn covariance(&self, distance: Real) -> Real
pub fn covariance(&self, distance: Real) -> Real
Covariance C(h) = C(0) − γ(h). For bounded models C(0) = sill; for the unbounded
power model, C(0) is not defined, so this method returns
0 there and kriging should use the semivariance form.
Trait Implementations§
Source§impl Clone for VariogramModel
impl Clone for VariogramModel
Source§fn clone(&self) -> VariogramModel
fn clone(&self) -> VariogramModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for VariogramModel
impl Debug for VariogramModel
Source§impl PartialEq for VariogramModel
impl PartialEq for VariogramModel
impl Copy for VariogramModel
impl StructuralPartialEq for VariogramModel
Auto Trait Implementations§
impl Freeze for VariogramModel
impl RefUnwindSafe for VariogramModel
impl Send for VariogramModel
impl Sync for VariogramModel
impl Unpin for VariogramModel
impl UnsafeUnpin for VariogramModel
impl UnwindSafe for VariogramModel
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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
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.