Struct nd_array::Array[][src]

pub struct Array<'a, T: Clone, const D: usize> { /* fields omitted */ }

Implementations

impl<'a, T: Clone, const D: usize> Array<'a, T, D>[src]

pub fn slice(&'a self, slice: &[Range<usize>; D]) -> Array<'a, T, D>[src]

pub fn get(&self, indices: [usize; D]) -> Option<&T>[src]

impl<'a, T: Clone + Ord, const D: usize> Array<'a, T, D>[src]

pub fn max(&self) -> Option<T>[src]

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

pub fn max_across(&self, axis: usize) -> Vec<Option<T>>[src]

pub fn arg_max_across(&self, axis: usize) -> Vec<Option<usize>>[src]

pub fn min(&self) -> Option<T>[src]

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

pub fn min_across(&self, axis: usize) -> Vec<Option<T>>[src]

pub fn arg_min_across(&self, axis: usize) -> Vec<Option<usize>>[src]

pub fn clip(&self, min: &T, max: &T) -> Array<'a, T, D>[src]

impl<'a, T, const D: usize> Array<'a, T, D> where
    T: Clone + Ord + Sub<Output = T>, 
[src]

pub fn ptp(&self) -> Option<T>[src]

pub fn ptp_across(&self, axis: usize) -> Vec<Option<T>>[src]

impl<'a, T, const D: usize> Array<'a, T, D> where
    T: Clone + Add<Output = T> + Zero
[src]

pub fn sum(&self) -> T[src]

pub fn sum_across(&self, axis: usize) -> Vec<T>[src]

impl<'a, T, const D: usize> Array<'a, T, D> where
    T: Clone + Mul<Output = T> + One
[src]

pub fn prod(&self) -> T[src]

pub fn prod_across(&self, axis: usize) -> Vec<T>[src]

impl<'a, T, const D: usize> Array<'a, T, D> where
    T: Clone + Add<Output = T> + FromPrimitive + Div<T, Output = T> + Zero
[src]

pub fn mean(&self) -> T[src]

pub fn mean_across(&self, axis: usize) -> Vec<T>[src]

impl<'a, T, const D: usize> Array<'a, T, D> where
    T: Clone + Sub<Output = T> + FromPrimitive + Div<T, Output = T> + Mul<Output = T> + Zero
[src]

pub fn var(&self) -> T[src]

pub fn var_across(&self, axis: usize) -> Vec<T>[src]

impl<'a, T: Clone, const D: usize> Array<'a, T, D>[src]

pub fn flat(&self) -> Iter<'_, T, D>[src]

pub fn axes(&self) -> Axes<'_, D>[src]

pub fn axis_view(&self, axis: usize) -> AxisView<'_, T, D>[src]

impl<'a, T: Clone, const D: usize> Array<'a, T, D>[src]

pub fn transpose(self) -> Array<'a, T, D>[src]

pub fn t(&'a self) -> Array<'a, T, D>[src]

pub fn flip(&'a self, axis: usize) -> Array<'a, T, D>[src]

pub fn swap_axes(&'a self, axis0: usize, axis1: usize) -> Array<'a, T, D>[src]

pub fn reshape<const S: usize>(&self, shape: [usize; S]) -> Array<'a, T, S>[src]

pub fn flatten(&self) -> Array<'a, T, 1>[src]

pub fn ravel(&self) -> Array<'a, T, 1>[src]

impl<'a, T: Clone + Default, const D: usize> Array<'a, T, D>[src]

pub fn resize<const S: usize>(self, shape: [usize; S]) -> Array<'a, T, S>[src]

impl<'a, T: Clone, const D: usize> Array<'a, T, D>[src]

pub fn init(vec: Vec<T>, shape: [usize; D]) -> Self[src]

pub fn shape(&self) -> &[usize; D][src]

pub fn strides(&self) -> &[usize; D][src]

pub fn full(val: T, shape: [usize; D]) -> Array<'a, T, D>[src]

pub fn full_like<'b, U: Clone>(
    val: T,
    array: &Array<'b, U, D>
) -> Array<'a, T, D>
[src]

impl<'a, T: Clone> Array<'a, T, 1>[src]

pub fn arange<I: Iterator<Item = T>>(range: I) -> Array<'a, T, 1>[src]

impl<'a, T: Clone + Zero, const D: usize> Array<'a, T, D>[src]

pub fn zeros(shape: [usize; D]) -> Self[src]

pub fn zeros_like<'b, U: Clone>(array: &Array<'b, U, D>) -> Array<'a, T, D>[src]

impl<'a, T: Clone + One, const D: usize> Array<'a, T, D>[src]

pub fn ones(shape: [usize; D]) -> Self[src]

pub fn ones_like<'b, U: Clone>(array: &Array<'b, U, D>) -> Array<'a, T, D>[src]

Trait Implementations

impl<'a, 'b, T: Clone + Add<Output = T>, const D: usize> Add<&'_ Array<'b, T, D>> for &Array<'a, T, D>[src]

type Output = Array<'a, T, D>

The resulting type after applying the + operator.

fn add(self, rhs: &Array<'b, T, D>) -> Self::Output[src]

Performs the + operation. Read more

impl<'a, 'b, T: Clone + Add<Output = T>, const D: usize> Add<Array<'b, T, D>> for Array<'a, T, D>[src]

type Output = Array<'a, T, D>

The resulting type after applying the + operator.

fn add(self, rhs: Array<'b, T, D>) -> Self::Output[src]

Performs the + operation. Read more

impl<'a, U: Clone, O: 'a + Clone, T: Clone + Div<U, Output = O>, const D: usize> Div<U> for &Array<'a, T, D>[src]

type Output = Array<'a, O, D>

The resulting type after applying the / operator.

fn div(self, rhs: U) -> Self::Output[src]

Performs the / operation. Read more

impl<'a, U: Clone, O: 'a + Clone, T: Clone + Div<U, Output = O>, const D: usize> Div<U> for Array<'a, T, D>[src]

type Output = Array<'a, O, D>

The resulting type after applying the / operator.

fn div(self, rhs: U) -> Self::Output[src]

Performs the / operation. Read more

impl<'a, T: Clone, const D: usize> Index<[usize; D]> for Array<'a, T, D>[src]

type Output = T

The returned type after indexing.

fn index(&self, indices: [usize; D]) -> &Self::Output[src]

Performs the indexing (container[index]) operation. Read more

impl<'a, U: Clone, O: 'a + Clone, T: Clone + Mul<U, Output = O>, const D: usize> Mul<U> for &Array<'a, T, D>[src]

type Output = Array<'a, O, D>

The resulting type after applying the * operator.

fn mul(self, rhs: U) -> Self::Output[src]

Performs the * operation. Read more

impl<'a, U: Clone, O: 'a + Clone, T: Clone + Mul<U, Output = O>, const D: usize> Mul<U> for Array<'a, T, D>[src]

type Output = Array<'a, O, D>

The resulting type after applying the * operator.

fn mul(self, rhs: U) -> Self::Output[src]

Performs the * operation. Read more

impl<'a, T: Clone + Neg<Output = T>, const D: usize> Neg for Array<'a, T, D>[src]

type Output = Array<'a, T, D>

The resulting type after applying the - operator.

fn neg(self) -> Self::Output[src]

Performs the unary - operation. Read more

impl<'a, 'b, T: Clone + Sub<Output = T>, const D: usize> Sub<&'_ Array<'b, T, D>> for &Array<'a, T, D>[src]

type Output = Array<'a, T, D>

The resulting type after applying the - operator.

fn sub(self, rhs: &Array<'b, T, D>) -> Self::Output[src]

Performs the - operation. Read more

impl<'a, 'b, T: Clone + Sub<Output = T>, const D: usize> Sub<Array<'b, T, D>> for Array<'a, T, D>[src]

type Output = Array<'a, T, D>

The resulting type after applying the - operator.

fn sub(self, rhs: Array<'b, T, D>) -> Self::Output[src]

Performs the - operation. Read more

Auto Trait Implementations

impl<'a, T, const D: usize> RefUnwindSafe for Array<'a, T, D> where
    T: RefUnwindSafe

impl<'a, T, const D: usize> Send for Array<'a, T, D> where
    T: Send + Sync

impl<'a, T, const D: usize> Sync for Array<'a, T, D> where
    T: Sync

impl<'a, T, const D: usize> Unpin for Array<'a, T, D> where
    T: Unpin

impl<'a, T, const D: usize> UnwindSafe for Array<'a, T, D> where
    T: RefUnwindSafe + UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.