pub struct SparseMemoryMappedKernelMatrix { /* private fields */ }Expand description
Sparse memory-mapped kernel matrix for very large, sparse datasets
Implementations§
Source§impl SparseMemoryMappedKernelMatrix
impl SparseMemoryMappedKernelMatrix
Sourcepub fn new(
kernel: Box<dyn Kernel>,
dimensions: (usize, usize),
config: MemoryMappedKernelConfig,
sparsity_threshold: Float,
) -> Result<Self>
pub fn new( kernel: Box<dyn Kernel>, dimensions: (usize, usize), config: MemoryMappedKernelConfig, sparsity_threshold: Float, ) -> Result<Self>
Create a new sparse memory-mapped kernel matrix
Sourcepub fn set(&mut self, i: usize, j: usize, value: Float) -> Result<()>
pub fn set(&mut self, i: usize, j: usize, value: Float) -> Result<()>
Set kernel value with sparsity consideration
Sourcepub fn sparsity_ratio(&self) -> f64
pub fn sparsity_ratio(&self) -> f64
Get sparsity ratio
Auto Trait Implementations§
impl !RefUnwindSafe for SparseMemoryMappedKernelMatrix
impl !UnwindSafe for SparseMemoryMappedKernelMatrix
impl Freeze for SparseMemoryMappedKernelMatrix
impl Send for SparseMemoryMappedKernelMatrix
impl Sync for SparseMemoryMappedKernelMatrix
impl Unpin for SparseMemoryMappedKernelMatrix
impl UnsafeUnpin for SparseMemoryMappedKernelMatrix
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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