pub struct CacheFriendlyMatrix { /* private fields */ }Expand description
Cache-friendly feature matrix wrapper
Implementations§
Source§impl CacheFriendlyMatrix
impl CacheFriendlyMatrix
Sourcepub fn from_array(
array: &Array2<f64>,
config: CacheConfig,
) -> Result<Self, SklearsError>
pub fn from_array( array: &Array2<f64>, config: CacheConfig, ) -> Result<Self, SklearsError>
Create a new cache-friendly matrix from an Array2
Sourcepub fn get(&self, row: usize, col: usize) -> Result<f64, SklearsError>
pub fn get(&self, row: usize, col: usize) -> Result<f64, SklearsError>
Get element at (row, col)
Sourcepub fn dot_vector(
&self,
vector: &Array1<f64>,
) -> Result<Array1<f64>, SklearsError>
pub fn dot_vector( &self, vector: &Array1<f64>, ) -> Result<Array1<f64>, SklearsError>
Perform cache-friendly matrix-vector multiplication
Auto Trait Implementations§
impl Freeze for CacheFriendlyMatrix
impl RefUnwindSafe for CacheFriendlyMatrix
impl Send for CacheFriendlyMatrix
impl Sync for CacheFriendlyMatrix
impl Unpin for CacheFriendlyMatrix
impl UnwindSafe for CacheFriendlyMatrix
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> 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