pub trait AltRealData: AltrepLen {
// Required method
fn elt(&self, i: usize) -> f64;
// Provided methods
fn as_slice(&self) -> Option<&[f64]> { ... }
fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize { ... }
fn is_sorted(&self) -> Option<Sortedness> { ... }
fn no_na(&self) -> Option<bool> { ... }
fn sum(&self, _na_rm: bool) -> Option<f64> { ... }
fn min(&self, _na_rm: bool) -> Option<f64> { ... }
fn max(&self, _na_rm: bool) -> Option<f64> { ... }
}Expand description
Trait for types that can back an ALTREAL vector.
Required Methods§
Provided Methods§
Sourcefn as_slice(&self) -> Option<&[f64]>
fn as_slice(&self) -> Option<&[f64]>
Optional: return a pointer to contiguous data if available.
Sourcefn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize
fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize
Optional: bulk read into buffer (clamped to available data).
Sourcefn is_sorted(&self) -> Option<Sortedness>
fn is_sorted(&self) -> Option<Sortedness>
Optional: sortedness hint.