Enum smartnoise_validator::base::Array[][src]

pub enum Array {
    Bool(ArrayD<bool>),
    Int(ArrayD<Integer>),
    Float(ArrayD<Float>),
    Str(ArrayD<String>),
}

The universal n-dimensional array representation.

ndarray ArrayD’s are artificially allowed to be 0, 1 or 2-dimensional. The first axis denotes the number rows/observations. The second axis the number of columns.

The Array has a one-to-one mapping to a protobuf ArrayND.

Variants

Bool(ArrayD<bool>)
Int(ArrayD<Integer>)
Float(ArrayD<Float>)
Str(ArrayD<String>)

Implementations

impl Array[src]

pub fn float(self) -> Result<ArrayD<Float>>[src]

Retrieve the float ndarray, assuming the data type of the ArrayND is float

pub fn cast_float(self) -> Result<ArrayD<f64>>[src]

pub fn ref_float(&self) -> Result<&ArrayD<Float>>[src]

pub fn first_float(&self) -> Result<Float>[src]

pub fn vec_float(self, optional_length: Option<i64>) -> Result<Vec<Float>>[src]

pub fn int(self) -> Result<ArrayD<Integer>>[src]

Retrieve the i64 ndarray, assuming the data type of the ArrayND is i64

pub fn ref_int(&self) -> Result<&ArrayD<Integer>>[src]

Retrieve the i64 ndarray, assuming the data type of the ArrayND is i64

pub fn first_int(&self) -> Result<Integer>[src]

pub fn vec_int(self, optional_length: Option<i64>) -> Result<Vec<Integer>>[src]

pub fn string(self) -> Result<ArrayD<String>>[src]

Retrieve the String ndarray, assuming the data type of the ArrayND is String

pub fn ref_string(&self) -> Result<&ArrayD<String>>[src]

pub fn first_string(&self) -> Result<String>[src]

pub fn bool(self) -> Result<ArrayD<bool>>[src]

Retrieve the bool ndarray, assuming the data type of the ArrayND is bool

pub fn ref_bool(&self) -> Result<&ArrayD<bool>>[src]

pub fn first_bool(&self) -> Result<bool>[src]

pub fn shape(&self) -> Vec<usize>[src]

pub fn num_records(&self) -> Result<usize>[src]

pub fn num_columns(&self) -> Result<usize>[src]

Trait Implementations

impl Clone for Array[src]

impl Debug for Array[src]

impl PartialEq<Array> for Array[src]

Auto Trait Implementations

impl RefUnwindSafe for Array

impl Send for Array

impl Sync for Array

impl Unpin for Array

impl UnwindSafe for Array

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]