pub struct DataCharacteristics {
pub n_samples: usize,
pub n_features: usize,
pub sparsity_scaled: u32,
pub dtype_size: usize,
pub memory_layout: MemoryLayout,
pub cache_friendliness_scaled: u32,
}Expand description
Data characteristics that affect performance
Fields§
§n_samples: usizeNumber of samples
n_features: usizeNumber of features
sparsity_scaled: u32Data sparsity (scaled by 1000, so 0 = dense, 1000 = fully sparse)
dtype_size: usizeData type size in bytes
memory_layout: MemoryLayoutMemory layout (row-major, column-major)
cache_friendliness_scaled: u32Cache friendliness score (scaled by 1000, so 0 = poor, 1000 = excellent)
Implementations§
Source§impl DataCharacteristics
impl DataCharacteristics
Sourcepub fn set_sparsity(&mut self, sparsity: f64)
pub fn set_sparsity(&mut self, sparsity: f64)
Set sparsity from f64
Sourcepub fn cache_friendliness(&self) -> f64
pub fn cache_friendliness(&self) -> f64
Get cache friendliness as f64
Sourcepub fn set_cache_friendliness(&mut self, cache_friendliness: f64)
pub fn set_cache_friendliness(&mut self, cache_friendliness: f64)
Set cache friendliness from f64
Trait Implementations§
Source§impl Clone for DataCharacteristics
impl Clone for DataCharacteristics
Source§fn clone(&self) -> DataCharacteristics
fn clone(&self) -> DataCharacteristics
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DataCharacteristics
impl Debug for DataCharacteristics
Source§impl Hash for DataCharacteristics
impl Hash for DataCharacteristics
Source§impl PartialEq for DataCharacteristics
impl PartialEq for DataCharacteristics
impl Eq for DataCharacteristics
impl StructuralPartialEq for DataCharacteristics
Auto Trait Implementations§
impl Freeze for DataCharacteristics
impl RefUnwindSafe for DataCharacteristics
impl Send for DataCharacteristics
impl Sync for DataCharacteristics
impl Unpin for DataCharacteristics
impl UnwindSafe for DataCharacteristics
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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