pub trait AbstractKernel: Send + Sync {
// Required method
fn compute<T: CustomNumeric + Copy + Debug>(&self, x: T, y: T) -> T;
// Provided method
fn is_centrosymmetric(&self) -> bool { ... }
}Expand description
Trait for general kernels (both centrosymmetric and non-centrosymmetric)
This trait provides the basic interface for computing kernel values.
Centrosymmetric kernels should implement CentrosymmKernel instead,
which provides additional optimizations.
Required Methods§
Provided Methods§
Sourcefn is_centrosymmetric(&self) -> bool
fn is_centrosymmetric(&self) -> bool
Check if the kernel is centrosymmetric
Returns true if and only if K(x, y) == K(-x, -y) for all values of x and y. This allows the kernel to be block-diagonalized, speeding up the singular value expansion by a factor of 4.
§Returns
True if the kernel is centrosymmetric, false otherwise.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.