Skip to main content

CompressedKernelMatrix

Trait CompressedKernelMatrix 

Source
pub trait CompressedKernelMatrix: Send + Sync {
    // Required methods
    fn get(&self, i: usize, j: usize) -> Result<Float>;
    fn get_block(
        &self,
        row_start: usize,
        row_end: usize,
        col_start: usize,
        col_end: usize,
    ) -> Result<Array2<Float>>;
    fn dimensions(&self) -> (usize, usize);
    fn compression_ratio(&self) -> Float;
    fn approximation_error(&self) -> Float;
    fn memory_usage(&self) -> usize;
}
Expand description

Compressed kernel matrix trait

Required Methods§

Source

fn get(&self, i: usize, j: usize) -> Result<Float>

Get kernel value at position (i, j)

Source

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

Source

fn dimensions(&self) -> (usize, usize)

Get matrix dimensions

Source

fn compression_ratio(&self) -> Float

Get compression ratio achieved

Source

fn approximation_error(&self) -> Float

Get approximation error

Source

fn memory_usage(&self) -> usize

Get memory usage in bytes

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§