Skip to main content

AltLogical

Trait AltLogical 

Source
pub trait AltLogical: AltVec {
    const HAS_ELT: bool = false;
    const HAS_GET_REGION: bool = false;
    const HAS_IS_SORTED: bool = false;
    const HAS_NO_NA: bool = false;
    const HAS_SUM: bool = false;

    // Provided methods
    fn elt(_x: SEXP, _i: R_xlen_t) -> i32 { ... }
    fn get_region(
        _x: SEXP,
        _i: R_xlen_t,
        _n: R_xlen_t,
        _buf: &mut [i32],
    ) -> R_xlen_t { ... }
    fn is_sorted(_x: SEXP) -> i32 { ... }
    fn no_na(_x: SEXP) -> i32 { ... }
    fn sum(_x: SEXP, _narm: bool) -> SEXP { ... }
}
Expand description

Logical vector methods.

Provided Associated Constants§

Source

const HAS_ELT: bool = false

Set to true to register elt.

Source

const HAS_GET_REGION: bool = false

Set to true to register get_region.

Source

const HAS_IS_SORTED: bool = false

Set to true to register is_sorted.

Source

const HAS_NO_NA: bool = false

Set to true to register no_na.

Source

const HAS_SUM: bool = false

Set to true to register sum.

Provided Methods§

Source

fn elt(_x: SEXP, _i: R_xlen_t) -> i32

Returns i32: 0=FALSE, 1=TRUE, NA_LOGICAL=NA

Source

fn get_region( _x: SEXP, _i: R_xlen_t, _n: R_xlen_t, _buf: &mut [i32], ) -> R_xlen_t

Bulk read elements into buffer.

Source

fn is_sorted(_x: SEXP) -> i32

Sortedness hint.

Source

fn no_na(_x: SEXP) -> i32

NA-free hint.

Source

fn sum(_x: SEXP, _narm: bool) -> SEXP

Sum for logical = count of TRUE 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.

Implementations on Foreign Types§

Source§

impl AltLogical for &'static [bool]

Source§

const HAS_ELT: bool = true

Source§

const HAS_NO_NA: bool = true

Source§

const HAS_SUM: bool = true

Source§

fn elt(x: SEXP, i: R_xlen_t) -> i32

Source§

fn no_na(x: SEXP) -> i32

Source§

fn sum(x: SEXP, narm: bool) -> SEXP

Source§

impl AltLogical for Box<[bool]>

Source§

const HAS_ELT: bool = true

Source§

const HAS_GET_REGION: bool = true

Source§

const HAS_IS_SORTED: bool = true

Source§

const HAS_NO_NA: bool = true

Source§

const HAS_SUM: bool = true

Source§

fn elt(x: SEXP, i: R_xlen_t) -> i32

Source§

fn get_region( x: SEXP, start: R_xlen_t, len: R_xlen_t, buf: &mut [i32], ) -> R_xlen_t

Source§

fn is_sorted(x: SEXP) -> i32

Source§

fn no_na(x: SEXP) -> i32

Source§

fn sum(x: SEXP, narm: bool) -> SEXP

Source§

impl AltLogical for Vec<bool>

Source§

const HAS_ELT: bool = true

Source§

const HAS_GET_REGION: bool = true

Source§

const HAS_IS_SORTED: bool = true

Source§

const HAS_NO_NA: bool = true

Source§

const HAS_SUM: bool = true

Source§

fn elt(x: SEXP, i: R_xlen_t) -> i32

Source§

fn get_region( x: SEXP, start: R_xlen_t, len: R_xlen_t, buf: &mut [i32], ) -> R_xlen_t

Source§

fn is_sorted(x: SEXP) -> i32

Source§

fn no_na(x: SEXP) -> i32

Source§

fn sum(x: SEXP, narm: bool) -> SEXP

Source§

impl<const N: usize> AltLogical for [bool; N]

Source§

const HAS_ELT: bool = true

Source§

const HAS_NO_NA: bool = true

Source§

fn elt(x: SEXP, i: R_xlen_t) -> i32

Source§

fn no_na(x: SEXP) -> i32

Implementors§

Source§

impl<I: Iterator<Item = bool> + 'static> AltLogical for IterLogicalData<I>

Source§

const HAS_ELT: bool = true

Source§

const HAS_GET_REGION: bool = true

Source§

impl<I: Iterator<Item = bool> + 'static> AltLogical for SparseIterLogicalData<I>

Source§

const HAS_ELT: bool = true

Source§

const HAS_GET_REGION: bool = true