pub struct MemoryMappedKernelMatrix { /* private fields */ }Expand description
Memory-mapped kernel matrix
Implementations§
Source§impl MemoryMappedKernelMatrix
impl MemoryMappedKernelMatrix
Sourcepub fn new(
kernel: Box<dyn Kernel>,
dimensions: (usize, usize),
config: MemoryMappedKernelConfig,
) -> Result<Self>
pub fn new( kernel: Box<dyn Kernel>, dimensions: (usize, usize), config: MemoryMappedKernelConfig, ) -> Result<Self>
Create a new memory-mapped kernel matrix
Sourcepub fn precompute(&mut self) -> Result<()>
pub fn precompute(&mut self) -> Result<()>
Precompute the entire 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 at position (i, j)
Sourcepub fn get_block(
&self,
row_start: usize,
row_end: usize,
col_start: usize,
col_end: usize,
) -> Result<Array2<Float>>
pub fn get_block( &self, row_start: usize, row_end: usize, col_start: usize, col_end: usize, ) -> Result<Array2<Float>>
Get a block of kernel values
Sourcepub fn set_block(
&mut self,
row_start: usize,
col_start: usize,
block: &Array2<Float>,
) -> Result<()>
pub fn set_block( &mut self, row_start: usize, col_start: usize, block: &Array2<Float>, ) -> Result<()>
Set a block of kernel values
Sourcepub fn dimensions(&self) -> (usize, usize)
pub fn dimensions(&self) -> (usize, usize)
Get matrix dimensions
Sourcepub fn cache_stats(&self) -> Result<CacheStats>
pub fn cache_stats(&self) -> Result<CacheStats>
Get cache hit rate statistics
Auto Trait Implementations§
impl !RefUnwindSafe for MemoryMappedKernelMatrix
impl !UnwindSafe for MemoryMappedKernelMatrix
impl Freeze for MemoryMappedKernelMatrix
impl Send for MemoryMappedKernelMatrix
impl Sync for MemoryMappedKernelMatrix
impl Unpin for MemoryMappedKernelMatrix
impl UnsafeUnpin for MemoryMappedKernelMatrix
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