Struct tract_core::internal::tract_ndarray::Dim[][src]

pub struct Dim<I> where
    I: ?Sized
{ /* fields omitted */ }
Expand description

Dimension description.

Dim describes the number of axes and the length of each axis in an array. It is also used as an index type.

See also the Dimension trait for its methods and operations.

Examples

To create an array with a particular dimension, you’d just pass a tuple (in this example (3, 2) is used), which is converted to Dim by the array constructor.

use ndarray::Array2;
use ndarray::Dim;

let mut array = Array2::zeros((3, 2));
array[[0, 0]] = 1.;
assert_eq!(array.raw_dim(), Dim([3, 2]));

Implementations

impl Dim<IxDynImpl>[src]

pub fn zeros(n: usize) -> Dim<IxDynImpl>[src]

Create a new dimension value with n axes, all zeros

Trait Implementations

impl<I> Add<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

type Output = Dim<I>

The resulting type after applying the + operator.

pub fn add(self, rhs: Dim<I>) -> Dim<I>[src]

Performs the + operation. Read more

impl Add<usize> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 1]>

The resulting type after applying the + operator.

pub fn add(self, rhs: usize) -> Dim<[usize; 1]>[src]

Performs the + operation. Read more

impl<'a, I> AddAssign<&'a Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn add_assign(&mut self, rhs: &Dim<I>)[src]

Performs the += operation. Read more

impl<I> AddAssign<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn add_assign(&mut self, rhs: Dim<I>)[src]

Performs the += operation. Read more

impl AddAssign<usize> for Dim<[usize; 1]>[src]

pub fn add_assign(&mut self, rhs: usize)[src]

Performs the += operation. Read more

impl<I> Clone for Dim<I> where
    I: Clone + ?Sized
[src]

pub fn clone(&self) -> Dim<I>[src]

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl<I> Debug for Dim<I> where
    I: Debug
[src]

pub fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>[src]

Formats the value using the given formatter. Read more

impl<I> Default for Dim<I> where
    I: Default + ?Sized
[src]

pub fn default() -> Dim<I>[src]

Returns the “default value” for a type. Read more

impl<D> DimAdd<D> for Dim<IxDynImpl> where
    D: Dimension
[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl<D> DimAdd<D> for Dim<[usize; 0]> where
    D: Dimension
[src]

type Output = D

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 2]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 4]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 1]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 0]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 3]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 3]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 4]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 5]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 1]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 2]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 4]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 3]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 2]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 5]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 4]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 3]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 5]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 3]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 5]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 4]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 3]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 2]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 6]>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 5]>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 1]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 3]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<[usize; 6]>> for Dim<[usize; 2]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 1]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 3]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 2]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimAdd<Dim<IxDynImpl>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The sum of the two dimensions.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 2]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 1]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 0]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 1]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 2]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 1]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 2]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 2]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 2]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 3]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 3]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 4]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 4]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 5]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<[usize; 6]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 5]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 4]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 5]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 0]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 3]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<[usize; 2]>[src]

type Output = Dim<[usize; 6]>

The resulting dimension type after broadcasting.

impl DimMax<Dim<[usize; 6]>> for Dim<IxDynImpl>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 1]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 2]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 4]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 0]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 5]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 3]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl DimMax<Dim<IxDynImpl>> for Dim<[usize; 6]>[src]

type Output = Dim<IxDynImpl>

The resulting dimension type after broadcasting.

impl Dimension for Dim<[usize; 1]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = usize

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 0]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 2]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn into_pattern(self) -> <Dim<[usize; 1]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn zeros(ndim: usize) -> Dim<[usize; 1]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn next_for(&self, index: Dim<[usize; 1]>) -> Option<Dim<[usize; 1]>>[src]

pub fn equal(&self, rhs: &Dim<[usize; 1]>) -> bool[src]

pub fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

pub fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

pub fn default_strides(&self) -> Dim<[usize; 1]>[src]

pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 1]>[src]

pub fn min_stride_axis(&self, &Dim<[usize; 1]>) -> Axis[src]

pub fn max_stride_axis(&self, &Dim<[usize; 1]>) -> Axis[src]

pub fn first_index(&self) -> Option<Dim<[usize; 1]>>[src]

pub fn stride_offset(index: &Dim<[usize; 1]>, stride: &Dim<[usize; 1]>) -> isize[src]

pub fn stride_offset_checked(
    &self,
    stride: &Dim<[usize; 1]>,
    index: &Dim<[usize; 1]>
) -> Option<isize>
[src]

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 1]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 1]> as Dimension>::Smaller
[src]

pub fn from_dimension<D2>(d: &D2) -> Option<Dim<[usize; 1]>> where
    D2: Dimension
[src]

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 4]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = (usize, usize, usize, usize)

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 3]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 5]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn into_pattern(self) -> <Dim<[usize; 4]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn zeros(ndim: usize) -> Dim<[usize; 4]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 4]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 4]> as Dimension>::Smaller
[src]

fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 5]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = (usize, usize, usize, usize, usize)

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 4]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 6]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn into_pattern(self) -> <Dim<[usize; 5]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn zeros(ndim: usize) -> Dim<[usize; 5]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 5]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 5]> as Dimension>::Smaller
[src]

fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 3]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = (usize, usize, usize)

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 2]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 4]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn into_pattern(self) -> <Dim<[usize; 3]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

pub fn zeros(ndim: usize) -> Dim<[usize; 3]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn next_for(&self, index: Dim<[usize; 3]>) -> Option<Dim<[usize; 3]>>[src]

pub fn stride_offset(
    index: &Dim<[usize; 3]>,
    strides: &Dim<[usize; 3]>
) -> isize
[src]

pub fn stride_offset_checked(
    &self,
    strides: &Dim<[usize; 3]>,
    index: &Dim<[usize; 3]>
) -> Option<isize>
[src]

pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 3]>[src]

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 3]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 3]> as Dimension>::Smaller
[src]

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<IxDynImpl>[src]

IxDyn is a “dynamic” index, pretty hard to use when indexing, and memory wasteful, but it allows an arbitrary and dynamic number of axes.

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = Dim<IxDynImpl>

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<IxDynImpl>

Next smaller dimension (if applicable)

type Larger = Dim<IxDynImpl>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn into_pattern(self) -> <Dim<IxDynImpl> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn zeros(ndim: usize) -> Dim<IxDynImpl>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn insert_axis(&self, axis: Axis) -> <Dim<IxDynImpl> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<IxDynImpl> as Dimension>::Smaller
[src]

pub fn from_dimension<D2>(d: &D2) -> Option<Dim<IxDynImpl>> where
    D2: Dimension
[src]

pub fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 0]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = ()

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 0]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 1]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 0]>[src]

pub fn into_pattern(self) -> <Dim<[usize; 0]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn zeros(ndim: usize) -> Dim<[usize; 0]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn next_for(&self, _index: Dim<[usize; 0]>) -> Option<Dim<[usize; 0]>>[src]

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 0]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    _ignore: Axis
) -> <Dim<[usize; 0]> as Dimension>::Smaller
[src]

fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 6]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = (usize, usize, usize, usize, usize, usize)

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 5]>

Next smaller dimension (if applicable)

type Larger = Dim<IxDynImpl>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn into_pattern(self) -> <Dim<[usize; 6]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn zeros(ndim: usize) -> Dim<[usize; 6]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 6]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 6]> as Dimension>::Smaller
[src]

fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl Dimension for Dim<[usize; 2]>[src]

pub const NDIM: Option<usize>[src]

For fixed-size dimension representations (e.g. Ix2), this should be Some(ndim), and for variable-size dimension representations (e.g. IxDyn), this should be None. Read more

type Pattern = (usize, usize)

Pattern matching friendly form of the dimension value. Read more

type Smaller = Dim<[usize; 1]>

Next smaller dimension (if applicable)

type Larger = Dim<[usize; 3]>

Next larger dimension

pub fn ndim(&self) -> usize[src]

Returns the number of dimensions (number of axes).

pub fn into_pattern(self) -> <Dim<[usize; 2]> as Dimension>::Pattern[src]

Convert the dimension into a pattern matching friendly value.

pub fn slice(&self) -> &[usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn slice_mut(&mut self) -> &mut [usize]

Notable traits for &'_ [u8]

impl<'_> Read for &'_ [u8]impl<'_> Write for &'_ mut [u8]
[src]

pub fn zeros(ndim: usize) -> Dim<[usize; 2]>[src]

Creates a dimension of all zeros with the specified ndim. Read more

pub fn next_for(&self, index: Dim<[usize; 2]>) -> Option<Dim<[usize; 2]>>[src]

pub fn equal(&self, rhs: &Dim<[usize; 2]>) -> bool[src]

pub fn size(&self) -> usize[src]

Compute the size of the dimension (number of elements)

pub fn size_checked(&self) -> Option<usize>[src]

Compute the size while checking for overflow.

pub fn last_elem(&self) -> usize[src]

pub fn set_last_elem(&mut self, i: usize)[src]

pub fn default_strides(&self) -> Dim<[usize; 2]>[src]

pub fn fortran_strides(&self) -> Dim<[usize; 2]>[src]

pub fn _fastest_varying_stride_order(&self) -> Dim<[usize; 2]>[src]

pub fn min_stride_axis(&self, strides: &Dim<[usize; 2]>) -> Axis[src]

pub fn first_index(&self) -> Option<Dim<[usize; 2]>>[src]

pub fn stride_offset(
    index: &Dim<[usize; 2]>,
    strides: &Dim<[usize; 2]>
) -> isize
[src]

pub fn stride_offset_checked(
    &self,
    strides: &Dim<[usize; 2]>,
    index: &Dim<[usize; 2]>
) -> Option<isize>
[src]

pub fn insert_axis(&self, axis: Axis) -> <Dim<[usize; 2]> as Dimension>::Larger[src]

pub fn try_remove_axis(
    &self,
    axis: Axis
) -> <Dim<[usize; 2]> as Dimension>::Smaller
[src]

fn as_array_view(&self) -> ArrayBase<ViewRepr<&usize>, Dim<[usize; 1]>>[src]

Borrow as a read-only array view.

fn as_array_view_mut(
    &mut self
) -> ArrayBase<ViewRepr<&mut usize>, Dim<[usize; 1]>>
[src]

Borrow as a read-write array view.

fn into_dyn(self) -> Dim<IxDynImpl>[src]

Convert the dimensional into a dynamic dimensional (IxDyn).

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<I> Hash for Dim<I> where
    I: Hash + ?Sized
[src]

pub fn hash<__H>(&self, state: &mut __H) where
    __H: Hasher
[src]

Feeds this value into the given Hasher. Read more

fn hash_slice<H>(data: &[Self], state: &mut H) where
    H: Hasher
1.3.0[src]

Feeds a slice of this type into the given Hasher. Read more

impl Index<usize> for Dim<[usize; 0]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 0]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 6]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 6]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 5]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 5]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<IxDynImpl>[src]

type Output = <IxDynImpl as Index<usize>>::Output

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<IxDynImpl> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 4]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 4]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 1]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 1]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 2]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 2]> as Index<usize>>::Output[src]

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

impl Index<usize> for Dim<[usize; 3]>[src]

type Output = usize

The returned type after indexing.

pub fn index(&self, index: usize) -> &<Dim<[usize; 3]> as Index<usize>>::Output[src]

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

impl IndexMut<usize> for Dim<[usize; 2]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 2]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 3]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 3]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<IxDynImpl>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<IxDynImpl> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 0]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 0]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 4]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 4]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 6]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 6]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 1]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 1]> as Index<usize>>::Output
[src]

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

impl IndexMut<usize> for Dim<[usize; 5]>[src]

pub fn index_mut(
    &mut self,
    index: usize
) -> &mut <Dim<[usize; 5]> as Index<usize>>::Output
[src]

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

impl<I> Mul<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

type Output = Dim<I>

The resulting type after applying the * operator.

pub fn mul(self, rhs: Dim<I>) -> Dim<I>[src]

Performs the * operation. Read more

impl<I> Mul<usize> for Dim<I> where
    Dim<I>: Dimension
[src]

type Output = Dim<I>

The resulting type after applying the * operator.

pub fn mul(self, rhs: usize) -> Dim<I>[src]

Performs the * operation. Read more

impl<'a, I> MulAssign<&'a Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn mul_assign(&mut self, rhs: &Dim<I>)[src]

Performs the *= operation. Read more

impl<I> MulAssign<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn mul_assign(&mut self, rhs: Dim<I>)[src]

Performs the *= operation. Read more

impl<I> MulAssign<usize> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn mul_assign(&mut self, rhs: usize)[src]

Performs the *= operation. Read more

impl NdIndex<Dim<[usize; 0]>> for [usize; 0][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 0]>,
    strides: &Dim<[usize; 0]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 0]>) -> isize[src]

impl NdIndex<Dim<[usize; 0]>> for ()[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 0]>,
    strides: &Dim<[usize; 0]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 0]>) -> isize[src]

impl NdIndex<Dim<[usize; 1]>> for usize[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 1]>,
    strides: &Dim<[usize; 1]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<[usize; 1]>) -> isize[src]

impl NdIndex<Dim<[usize; 1]>> for [usize; 1][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 1]>,
    strides: &Dim<[usize; 1]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 1]>) -> isize[src]

impl NdIndex<Dim<[usize; 2]>> for (usize, usize)[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 2]>,
    strides: &Dim<[usize; 2]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<[usize; 2]>) -> isize[src]

impl NdIndex<Dim<[usize; 2]>> for [usize; 2][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 2]>,
    strides: &Dim<[usize; 2]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 2]>) -> isize[src]

impl NdIndex<Dim<[usize; 3]>> for [usize; 3][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 3]>,
    strides: &Dim<[usize; 3]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 3]>) -> isize[src]

impl NdIndex<Dim<[usize; 3]>> for (usize, usize, usize)[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 3]>,
    strides: &Dim<[usize; 3]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<[usize; 3]>) -> isize[src]

impl NdIndex<Dim<[usize; 4]>> for (usize, usize, usize, usize)[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 4]>,
    strides: &Dim<[usize; 4]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<[usize; 4]>) -> isize[src]

impl NdIndex<Dim<[usize; 4]>> for [usize; 4][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 4]>,
    strides: &Dim<[usize; 4]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 4]>) -> isize[src]

impl NdIndex<Dim<[usize; 5]>> for [usize; 5][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 5]>,
    strides: &Dim<[usize; 5]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 5]>) -> isize[src]

impl NdIndex<Dim<[usize; 5]>> for (usize, usize, usize, usize, usize)[src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 5]>,
    strides: &Dim<[usize; 5]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<[usize; 5]>) -> isize[src]

impl NdIndex<Dim<[usize; 6]>> for [usize; 6][src]

pub fn index_checked(
    &self,
    dim: &Dim<[usize; 6]>,
    strides: &Dim<[usize; 6]>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, _strides: &Dim<[usize; 6]>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 3][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 4][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 6]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl<'a> NdIndex<Dim<IxDynImpl>> for &'a [usize][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 0]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 1]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 5][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 5]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 1][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 0][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 2][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for usize[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 2]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for [usize; 6][src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 3]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 4]>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl<'a> NdIndex<Dim<IxDynImpl>> for &'a Dim<IxDynImpl>[src]

pub fn index_checked(
    &self,
    dim: &Dim<IxDynImpl>,
    strides: &Dim<IxDynImpl>
) -> Option<isize>
[src]

pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]

impl<I> PartialEq<Dim<I>> for Dim<I> where
    I: PartialEq<I> + ?Sized
[src]

pub fn eq(&self, other: &Dim<I>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

pub fn ne(&self, other: &Dim<I>) -> bool[src]

This method tests for !=.

impl<I> PartialEq<I> for Dim<I> where
    I: PartialEq<I> + ?Sized
[src]

pub fn eq(&self, rhs: &I) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

impl RemoveAxis for Dim<IxDynImpl>[src]

pub fn remove_axis(&self, axis: Axis) -> Dim<IxDynImpl>[src]

impl RemoveAxis for Dim<[usize; 4]>[src]

pub fn remove_axis(&self, axis: Axis) -> <Dim<[usize; 4]> as Dimension>::Smaller[src]

impl RemoveAxis for Dim<[usize; 3]>[src]

pub fn remove_axis(&self, axis: Axis) -> <Dim<[usize; 3]> as Dimension>::Smaller[src]

impl RemoveAxis for Dim<[usize; 1]>[src]

pub fn remove_axis(&self, axis: Axis) -> Dim<[usize; 0]>[src]

impl RemoveAxis for Dim<[usize; 5]>[src]

pub fn remove_axis(&self, axis: Axis) -> <Dim<[usize; 5]> as Dimension>::Smaller[src]

impl RemoveAxis for Dim<[usize; 6]>[src]

pub fn remove_axis(&self, axis: Axis) -> <Dim<[usize; 6]> as Dimension>::Smaller[src]

impl RemoveAxis for Dim<[usize; 2]>[src]

pub fn remove_axis(&self, axis: Axis) -> Dim<[usize; 1]>[src]

impl<T, Dout> SliceArg<Dim<[usize; 0]>> for SliceInfo<T, Dim<[usize; 0]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 1]>> for SliceInfo<T, Dim<[usize; 1]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 2]>> for SliceInfo<T, Dim<[usize; 2]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 3]>> for SliceInfo<T, Dim<[usize; 3]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 4]>> for SliceInfo<T, Dim<[usize; 4]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 5]>> for SliceInfo<T, Dim<[usize; 5]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Dout> SliceArg<Dim<[usize; 6]>> for SliceInfo<T, Dim<[usize; 6]>, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl SliceArg<Dim<IxDynImpl>> for [SliceInfoElem][src]

type OutDim = Dim<IxDynImpl>

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<T, Din, Dout> SliceArg<Dim<IxDynImpl>> for SliceInfo<T, Din, Dout> where
    T: AsRef<[SliceInfoElem]>,
    Din: Dimension,
    Dout: Dimension
[src]

type OutDim = Dout

Dimensionality of the output array.

pub fn in_ndim(&self) -> usize[src]

Returns the number of axes in the input array.

pub fn out_ndim(&self) -> usize[src]

Returns the number of axes in the output array.

fn __private__(&self) -> PrivateMarker[src]

This trait is private to implement; this method exists to make it impossible to implement outside the crate. Read more

impl<I> Sub<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

type Output = Dim<I>

The resulting type after applying the - operator.

pub fn sub(self, rhs: Dim<I>) -> Dim<I>[src]

Performs the - operation. Read more

impl Sub<usize> for Dim<[usize; 1]>[src]

type Output = Dim<[usize; 1]>

The resulting type after applying the - operator.

pub fn sub(self, rhs: usize) -> Dim<[usize; 1]>[src]

Performs the - operation. Read more

impl<'a, I> SubAssign<&'a Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn sub_assign(&mut self, rhs: &Dim<I>)[src]

Performs the -= operation. Read more

impl<I> SubAssign<Dim<I>> for Dim<I> where
    Dim<I>: Dimension
[src]

pub fn sub_assign(&mut self, rhs: Dim<I>)[src]

Performs the -= operation. Read more

impl SubAssign<usize> for Dim<[usize; 1]>[src]

pub fn sub_assign(&mut self, rhs: usize)[src]

Performs the -= operation. Read more

impl Zero for Dim<[usize; 1]>[src]

pub fn zero() -> Dim<[usize; 1]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 6]>[src]

pub fn zero() -> Dim<[usize; 6]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 2]>[src]

pub fn zero() -> Dim<[usize; 2]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 5]>[src]

pub fn zero() -> Dim<[usize; 5]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 4]>[src]

pub fn zero() -> Dim<[usize; 4]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 3]>[src]

pub fn zero() -> Dim<[usize; 3]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl Zero for Dim<[usize; 0]>[src]

pub fn zero() -> Dim<[usize; 0]>[src]

Returns the additive identity element of Self, 0. Read more

pub fn is_zero(&self) -> bool[src]

Returns true if self is equal to the additive identity.

fn set_zero(&mut self)[src]

Sets self to the additive identity element of Self, 0.

impl<I> Copy for Dim<I> where
    I: Copy + ?Sized
[src]

impl<I> Eq for Dim<I> where
    I: Eq + ?Sized
[src]

impl<I> StructuralEq for Dim<I> where
    I: ?Sized
[src]

impl<I> StructuralPartialEq for Dim<I> where
    I: ?Sized
[src]

Auto Trait Implementations

impl<I: ?Sized> RefUnwindSafe for Dim<I> where
    I: RefUnwindSafe

impl<I: ?Sized> Send for Dim<I> where
    I: Send

impl<I: ?Sized> Sync for Dim<I> where
    I: Sync

impl<I: ?Sized> Unpin for Dim<I> where
    I: Unpin

impl<I: ?Sized> UnwindSafe for Dim<I> where
    I: 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<D> DimMax<D> for D where
    D: Dimension
[src]

type Output = D

The resulting dimension type after broadcasting.

impl<T> Downcast for T where
    T: Any
[src]

pub fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>

Notable traits for Box<R, Global>

impl<R> Read for Box<R, Global> where
    R: Read + ?Sized
impl<W> Write for Box<W, Global> where
    W: Write + ?Sized
impl<F, A> Future for Box<F, A> where
    F: Future + Unpin + ?Sized,
    A: Allocator + 'static, 
type Output = <F as Future>::Output;impl<I, A> Iterator for Box<I, A> where
    A: Allocator,
    I: Iterator + ?Sized
type Item = <I as Iterator>::Item;
[src]

Convert Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can then be further downcast into Box<ConcreteType> where ConcreteType implements Trait. Read more

pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>[src]

Convert Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be further downcast into Rc<ConcreteType> where ConcreteType implements Trait. Read more

pub fn as_any(&self) -> &(dyn Any + 'static)[src]

Convert &Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &Any’s vtable from &Trait’s. Read more

pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)[src]

Convert &mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot generate &mut Any’s vtable from &mut Trait’s. Read more

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

pub fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + 'static + Sync + Send>[src]

Convert Arc<Trait> (where Trait: Downcast) to Arc<Any>. Arc<Any> can then be further downcast into Arc<ConcreteType> where ConcreteType implements Trait. Read more

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

pub fn __clone_box(&self, Private) -> *mut ()[src]

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<D> IntoDimension for D where
    D: Dimension
[src]

type Dim = D

pub fn into_dimension(self) -> D[src]

impl<D> NdIndex<D> for D where
    D: Dimension
[src]

pub fn index_checked(&self, dim: &D, strides: &D) -> Option<isize>[src]

pub fn index_unchecked(&self, strides: &D) -> isize[src]

impl<T> ShapeArg for T where
    T: IntoDimension
[src]

type Dim = <T as IntoDimension>::Dim

pub fn into_shape_and_order(self) -> (<T as ShapeArg>::Dim, Option<Order>)[src]

impl<T> ShapeBuilder for T where
    T: IntoDimension
[src]

type Dim = <T as IntoDimension>::Dim

type Strides = T

pub fn into_shape(self) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn f(self) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn set_f(self, is_f: bool) -> Shape<<T as ShapeBuilder>::Dim>[src]

pub fn strides(self, st: T) -> StrideShape<<T as ShapeBuilder>::Dim>[src]

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

type Owned = T

The resulting type after obtaining ownership.

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

Creates owned data from borrowed data, usually by cloning. Read more

pub fn clone_into(&self, target: &mut T)[src]

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.