pub struct TypeSafeKernelApproximation<State, Kernel, Method, const N_COMPONENTS: usize>{ /* private fields */ }Expand description
Type-safe kernel approximation with compile-time guarantees TypeSafeKernelApproximation
Implementations§
Source§impl<Kernel, Method, const N_COMPONENTS: usize> TypeSafeKernelApproximation<Untrained, Kernel, Method, N_COMPONENTS>where
Kernel: KernelType,
Method: ApproximationMethod,
impl<Kernel, Method, const N_COMPONENTS: usize> TypeSafeKernelApproximation<Untrained, Kernel, Method, N_COMPONENTS>where
Kernel: KernelType,
Method: ApproximationMethod,
Sourcepub fn bandwidth(self, bandwidth: f64) -> Selfwhere
Kernel: KernelTypeWithBandwidth,
pub fn bandwidth(self, bandwidth: f64) -> Selfwhere
Kernel: KernelTypeWithBandwidth,
Set bandwidth parameter (only available for kernels that support it)
Sourcepub fn degree(self, degree: usize) -> Selfwhere
Kernel: PolynomialKernelType,
pub fn degree(self, degree: usize) -> Selfwhere
Kernel: PolynomialKernelType,
Set polynomial degree (only available for polynomial kernels)
Sourcepub fn random_state(self, seed: u64) -> Self
pub fn random_state(self, seed: u64) -> Self
Set random state for reproducibility
Sourcepub fn fit(
self,
data: &Array2<f64>,
) -> Result<FittedTypeSafeKernelApproximation<Kernel, Method, N_COMPONENTS>>where
Kernel: FittableKernel<Method>,
Method: FittableMethod<Kernel>,
pub fn fit(
self,
data: &Array2<f64>,
) -> Result<FittedTypeSafeKernelApproximation<Kernel, Method, N_COMPONENTS>>where
Kernel: FittableKernel<Method>,
Method: FittableMethod<Kernel>,
Fit the approximation method (state transition)
Trait Implementations§
Source§impl<State, Kernel, Method, const N_COMPONENTS: usize> Clone for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>where
State: ApproximationState + Clone,
Kernel: KernelType + Clone,
Method: ApproximationMethod + Clone,
impl<State, Kernel, Method, const N_COMPONENTS: usize> Clone for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>where
State: ApproximationState + Clone,
Kernel: KernelType + Clone,
Method: ApproximationMethod + Clone,
Source§fn clone(
&self,
) -> TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
fn clone( &self, ) -> TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
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<State, Kernel, Method, const N_COMPONENTS: usize> Debug for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>where
State: ApproximationState + Debug,
Kernel: KernelType + Debug,
Method: ApproximationMethod + Debug,
impl<State, Kernel, Method, const N_COMPONENTS: usize> Debug for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>where
State: ApproximationState + Debug,
Kernel: KernelType + Debug,
Method: ApproximationMethod + Debug,
Source§impl<Kernel, Method, const N_COMPONENTS: usize> Default for TypeSafeKernelApproximation<Untrained, Kernel, Method, N_COMPONENTS>where
Kernel: KernelType,
Method: ApproximationMethod,
impl<Kernel, Method, const N_COMPONENTS: usize> Default for TypeSafeKernelApproximation<Untrained, Kernel, Method, N_COMPONENTS>where
Kernel: KernelType,
Method: ApproximationMethod,
Auto Trait Implementations§
impl<State, Kernel, Method, const N_COMPONENTS: usize> Freeze for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
impl<State, Kernel, Method, const N_COMPONENTS: usize> RefUnwindSafe for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
impl<State, Kernel, Method, const N_COMPONENTS: usize> Send for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
impl<State, Kernel, Method, const N_COMPONENTS: usize> Sync for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
impl<State, Kernel, Method, const N_COMPONENTS: usize> Unpin for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
impl<State, Kernel, Method, const N_COMPONENTS: usize> UnwindSafe for TypeSafeKernelApproximation<State, Kernel, Method, N_COMPONENTS>
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