WeightParams

Struct WeightParams 

Source
pub struct WeightParams<T> {
    pub x_current: T,
    pub bandwidth: T,
    pub h1: T,
    pub h9: T,
    pub use_robustness: bool,
    pub weight_fn: WeightFunction,
}
Expand description

Parameters for weight computation.

Fields§

§x_current: T

Current x value being fitted

§bandwidth: T

Bandwidth (window half-width)

§h1: T

NOTE: h1 and h9 are implementation optimizations / truncation thresholds, not formal LOWESS parameters. They are used to fast-path near-zero distances (h1) and to truncate the kernel support for efficiency (h9). h1 = 0.001 * bandwidth ⇒ kernel weight forced to 1.0 for extremely close points; h9 = 0.999 * bandwidth used to stop scanning beyond the effective window in sorted x arrays. Low threshold (0.001 * bandwidth) – assign weight 1.0

§h9: T

High threshold (0.999 * bandwidth) – assign weight 0.0

§use_robustness: bool

Whether to use robustness weights

§weight_fn: WeightFunction

Weight function to use

Auto Trait Implementations§

§

impl<T> Freeze for WeightParams<T>
where T: Freeze,

§

impl<T> RefUnwindSafe for WeightParams<T>
where T: RefUnwindSafe,

§

impl<T> Send for WeightParams<T>
where T: Send,

§

impl<T> Sync for WeightParams<T>
where T: Sync,

§

impl<T> Unpin for WeightParams<T>
where T: Unpin,

§

impl<T> UnwindSafe for WeightParams<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.