pub trait Array2<T: Debug + Display + Copy + Sized>: MutArrayView2<T> + Sized + Clone {
Show 42 methods fn fill(nrows: usize, ncols: usize, value: T) -> Self; fn slice<'a>(
        &'a self,
        rows: Range<usize>,
        cols: Range<usize>
    ) -> Box<dyn ArrayView2<T> + 'a>
    where
        Self: Sized
; fn slice_mut<'a>(
        &'a mut self,
        rows: Range<usize>,
        cols: Range<usize>
    ) -> Box<dyn MutArrayView2<T> + 'a>
    where
        Self: Sized
; fn from_iterator<I: Iterator<Item = T>>(
        iter: I,
        nrows: usize,
        ncols: usize,
        axis: u8
    ) -> Self; fn get_row<'a>(&'a self, row: usize) -> Box<dyn ArrayView1<T> + 'a>
    where
        Self: Sized
; fn get_col<'a>(&'a self, col: usize) -> Box<dyn ArrayView1<T> + 'a>
    where
        Self: Sized
; fn zeros(nrows: usize, ncols: usize) -> Self
    where
        T: Number
, { ... } fn ones(nrows: usize, ncols: usize) -> Self
    where
        T: Number
, { ... } fn eye(size: usize) -> Self
    where
        T: Number
, { ... } fn rand(nrows: usize, ncols: usize) -> Self
    where
        T: RealNumber
, { ... } fn from_slice(slice: &dyn ArrayView2<T>) -> Self { ... } fn from_row(slice: &dyn ArrayView1<T>) -> Self { ... } fn from_column(slice: &dyn ArrayView1<T>) -> Self { ... } fn transpose(&self) -> Self { ... } fn reshape(&self, nrows: usize, ncols: usize, axis: u8) -> Self { ... } fn matmul(&self, other: &dyn ArrayView2<T>) -> Self
    where
        T: Number
, { ... } fn ab(
        &self,
        a_transpose: bool,
        b: &dyn ArrayView2<T>,
        b_transpose: bool
    ) -> Self
    where
        T: Number
, { ... } fn ax(&self, a_transpose: bool, x: &dyn ArrayView1<T>) -> Self
    where
        T: Number
, { ... } fn concatenate_1d<'a>(arrays: &'a [&'a dyn ArrayView1<T>], axis: u8) -> Self { ... } fn concatenate_2d<'a>(arrays: &'a [&'a dyn ArrayView2<T>], axis: u8) -> Self { ... } fn merge_1d<'a>(
        &'a self,
        arrays: &'a [&'a dyn ArrayView1<T>],
        axis: u8,
        append: bool
    ) -> Self { ... } fn v_stack(&self, other: &dyn ArrayView2<T>) -> Self { ... } fn h_stack(&self, other: &dyn ArrayView2<T>) -> Self { ... } fn map<O: Debug + Display + Copy + Sized, A: Array2<O>, F: FnMut(&T) -> O>(
        self,
        f: F
    ) -> A { ... } fn row_iter<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = Box<dyn ArrayView1<T> + 'a>> + 'a> { ... } fn col_iter<'a>(
        &'a self
    ) -> Box<dyn Iterator<Item = Box<dyn ArrayView1<T> + 'a>> + 'a> { ... } fn take(&self, index: &[usize], axis: u8) -> Self { ... } fn take_column(&self, column_index: usize) -> Self { ... } fn add_scalar(&self, x: T) -> Self
    where
        T: Number
, { ... } fn sub_scalar(&self, x: T) -> Self
    where
        T: Number
, { ... } fn div_scalar(&self, x: T) -> Self
    where
        T: Number
, { ... } fn mul_scalar(&self, x: T) -> Self
    where
        T: Number
, { ... } fn add(&self, other: &dyn Array<T, (usize, usize)>) -> Self
    where
        T: Number
, { ... } fn sub(&self, other: &dyn Array<T, (usize, usize)>) -> Self
    where
        T: Number
, { ... } fn mul(&self, other: &dyn Array<T, (usize, usize)>) -> Self
    where
        T: Number
, { ... } fn div(&self, other: &dyn Array<T, (usize, usize)>) -> Self
    where
        T: Number
, { ... } fn abs(&self) -> Self
    where
        T: Number + Signed
, { ... } fn neg(&self) -> Self
    where
        T: Number + Neg<Output = T>
, { ... } fn pow(&self, p: T) -> Self
    where
        T: RealNumber
, { ... } fn column_mean(&self) -> Vec<f64>
    where
        T: Number + ToPrimitive
, { ... } fn copy_col_as_vec(&self, col: usize, result: &mut Vec<T>) { ... } fn approximate_eq(&self, other: &Self, error: T) -> bool
    where
        T: Number + RealNumber
, { ... }
}
Expand description

Trait for mutable 2D-array view

Required Methods

Provided Methods

Take an individual column from the matrix.

compute mean for each column

copy coumn as a vector

appriximate equality of the elements of a matrix according to a given error

Implementors