extendr_api::wrapper::altrep

Trait AltRealImpl

Source
pub trait AltRealImpl: AltrepImpl {
    // Required method
    fn elt(&self, _index: usize) -> Rfloat;

    // Provided methods
    fn tot_min_max_nas(&self) -> (f64, f64, f64, usize, usize) { ... }
    fn get_region(&self, index: usize, data: &mut [Rfloat]) -> usize { ... }
    fn is_sorted(&self) -> Rbool { ... }
    fn no_na(&self) -> bool { ... }
    fn sum(&self, remove_nas: bool) -> Robj { ... }
    fn min(&self, remove_nas: bool) -> Robj { ... }
    fn max(&self, remove_nas: bool) -> Robj { ... }
}

Required Methods§

Source

fn elt(&self, _index: usize) -> Rfloat

Get a single element from this vector.

Provided Methods§

Source

fn tot_min_max_nas(&self) -> (f64, f64, f64, usize, usize)

Source

fn get_region(&self, index: usize, data: &mut [Rfloat]) -> usize

Get a multiple elements from this vector.

Source

fn is_sorted(&self) -> Rbool

Return TRUE if this vector is sorted, FALSE if not and Rbool::na() if unknown.

Source

fn no_na(&self) -> bool

Return true if this vector does not contain NAs.

Source

fn sum(&self, remove_nas: bool) -> Robj

Return the sum of the elements in this vector. If remove_nas is true, skip and NA values.

Source

fn min(&self, remove_nas: bool) -> Robj

Return the minimum of the elements in this vector. If remove_nas is true, skip and NA values.

Source

fn max(&self, remove_nas: bool) -> Robj

Return the maximum of the elements in this vector. If remove_nas is true, skip and NA values.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<Iter: ExactSizeIterator + Debug + Clone> AltRealImpl for Iter
where Iter::Item: Into<Rfloat>,