Skip to main content

AltRealData

Trait AltRealData 

Source
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§

Source

fn elt(&self, i: usize) -> f64

Get the real element at index i.

Provided Methods§

Source

fn as_slice(&self) -> Option<&[f64]>

Optional: return a pointer to contiguous data if available.

Source

fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize

Optional: bulk read into buffer (clamped to available data).

Source

fn is_sorted(&self) -> Option<Sortedness>

Optional: sortedness hint.

Source

fn no_na(&self) -> Option<bool>

Optional: does this vector contain any NA values?

Source

fn sum(&self, _na_rm: bool) -> Option<f64>

Optional: optimized sum.

Source

fn min(&self, _na_rm: bool) -> Option<f64>

Optional: optimized min.

Source

fn max(&self, _na_rm: bool) -> Option<f64>

Optional: optimized max.

Implementations on Foreign Types§

Source§

impl AltRealData for &[f64]

Source§

fn elt(&self, i: usize) -> f64

Source§

fn as_slice(&self) -> Option<&[f64]>

Source§

fn no_na(&self) -> Option<bool>

Source§

fn sum(&self, na_rm: bool) -> Option<f64>

Source§

fn min(&self, na_rm: bool) -> Option<f64>

Source§

fn max(&self, na_rm: bool) -> Option<f64>

Source§

impl AltRealData for Cow<'static, [f64]>

Source§

fn elt(&self, i: usize) -> f64

Source§

fn as_slice(&self) -> Option<&[f64]>

Source§

fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize

Source§

fn no_na(&self) -> Option<bool>

Source§

fn sum(&self, na_rm: bool) -> Option<f64>

Source§

fn min(&self, na_rm: bool) -> Option<f64>

Source§

fn max(&self, na_rm: bool) -> Option<f64>

Source§

impl AltRealData for Box<[f64]>

Source§

fn elt(&self, i: usize) -> f64

Source§

fn as_slice(&self) -> Option<&[f64]>

Source§

fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize

Source§

fn no_na(&self) -> Option<bool>

Source§

fn sum(&self, na_rm: bool) -> Option<f64>

Source§

fn min(&self, na_rm: bool) -> Option<f64>

Source§

fn max(&self, na_rm: bool) -> Option<f64>

Source§

impl AltRealData for Vec<f64>

Source§

fn elt(&self, i: usize) -> f64

Source§

fn as_slice(&self) -> Option<&[f64]>

Source§

fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize

Source§

fn no_na(&self) -> Option<bool>

Source§

fn sum(&self, na_rm: bool) -> Option<f64>

Source§

fn min(&self, na_rm: bool) -> Option<f64>

Source§

fn max(&self, na_rm: bool) -> Option<f64>

Source§

impl AltRealData for Range<f64>

Source§

fn elt(&self, i: usize) -> f64

Source§

fn is_sorted(&self) -> Option<Sortedness>

Source§

fn no_na(&self) -> Option<bool>

Source§

fn sum(&self, _na_rm: bool) -> Option<f64>

Source§

fn min(&self, _na_rm: bool) -> Option<f64>

Source§

fn max(&self, _na_rm: bool) -> Option<f64>

Source§

impl<const N: usize> AltRealData for [f64; N]

Source§

fn elt(&self, i: usize) -> f64

Source§

fn as_slice(&self) -> Option<&[f64]>

Source§

fn get_region(&self, start: usize, len: usize, buf: &mut [f64]) -> usize

Source§

fn no_na(&self) -> Option<bool>

Implementors§

Source§

impl<F: Fn(usize, &mut [f64]) -> usize> AltRealData for StreamingRealData<F>

Source§

impl<I, T> AltRealData for IterRealCoerceData<I, T>
where I: Iterator<Item = T>, T: Coerce<f64> + Copy,

Source§

impl<I: Iterator<Item = f64>> AltRealData for IterRealData<I>

Source§

impl<I: Iterator<Item = f64>> AltRealData for SparseIterRealData<I>

Source§

impl<I: Iterator<Item = f64>> AltRealData for WindowedIterRealData<I>