pub struct ForgetfulConfig {
pub lambda: f64,
pub removal_threshold: Option<f64>,
pub max_samples: Option<usize>,
}Expand description
Configuration for forgetful kernel matrix.
Fields§
§lambda: f64Forgetting factor (0 < λ <= 1) λ = 1: no forgetting (infinite memory) λ < 1: older samples weighted less
removal_threshold: Option<f64>Threshold below which samples are removed
max_samples: Option<usize>Maximum number of samples to keep
Implementations§
Source§impl ForgetfulConfig
impl ForgetfulConfig
Sourcepub fn with_lambda(lambda: f64) -> Result<Self>
pub fn with_lambda(lambda: f64) -> Result<Self>
Create configuration with specified forgetting factor.
Sourcepub fn with_max_samples(self, max: usize) -> Self
pub fn with_max_samples(self, max: usize) -> Self
Set maximum samples limit.
Sourcepub fn with_threshold(self, threshold: f64) -> Self
pub fn with_threshold(self, threshold: f64) -> Self
Set removal threshold.
Trait Implementations§
Source§impl Clone for ForgetfulConfig
impl Clone for ForgetfulConfig
Source§fn clone(&self) -> ForgetfulConfig
fn clone(&self) -> ForgetfulConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ForgetfulConfig
impl Debug for ForgetfulConfig
Auto Trait Implementations§
impl Freeze for ForgetfulConfig
impl RefUnwindSafe for ForgetfulConfig
impl Send for ForgetfulConfig
impl Sync for ForgetfulConfig
impl Unpin for ForgetfulConfig
impl UnwindSafe for ForgetfulConfig
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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