[−][src]Trait tract_core::internal::tract_ndarray::NdIndex
Tuple or fixed size arrays that can be used to index an array.
use ndarray::arr2; let mut a = arr2(&[[0, 1], [2, 3]]); assert_eq!(a[[0, 1]], 1); assert_eq!(a[[1, 1]], 3); a[[1, 1]] += 1; assert_eq!(a[(1, 1)], 4);
Implementations on Foreign Types
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]
&self,
dim: &Dim<[usize; 3]>,
strides: &Dim<[usize; 3]>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<[usize; 3]>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 4][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> 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]
&self,
dim: &Dim<[usize; 5]>,
strides: &Dim<[usize; 5]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 5]>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 6][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> 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]
&self,
dim: &Dim<[usize; 1]>,
strides: &Dim<[usize; 1]>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<[usize; 1]>) -> 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]
&self,
dim: &Dim<[usize; 4]>,
strides: &Dim<[usize; 4]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 4]>) -> 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]
&self,
dim: &Dim<[usize; 2]>,
strides: &Dim<[usize; 2]>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<[usize; 2]>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 0][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 3][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> 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]
&self,
dim: &Dim<[usize; 1]>,
strides: &Dim<[usize; 1]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 1]>) -> 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]
&self,
dim: &Dim<[usize; 5]>,
strides: &Dim<[usize; 5]>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<[usize; 5]>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 2][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> 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]
&self,
dim: &Dim<[usize; 0]>,
strides: &Dim<[usize; 0]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 0]>) -> 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]
&self,
dim: &Dim<[usize; 2]>,
strides: &Dim<[usize; 2]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 2]>) -> isize[src]
impl NdIndex<Dim<IxDynImpl>> for [usize; 1][src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> 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]
&self,
dim: &Dim<[usize; 6]>,
strides: &Dim<[usize; 6]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 6]>) -> isize[src]
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]
&self,
dim: &Dim<[usize; 0]>,
strides: &Dim<[usize; 0]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 0]>) -> 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]
&self,
dim: &Dim<[usize; 4]>,
strides: &Dim<[usize; 4]>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<[usize; 4]>) -> 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]
&self,
dim: &Dim<[usize; 3]>,
strides: &Dim<[usize; 3]>
) -> Option<isize>
pub fn index_unchecked(&self, _strides: &Dim<[usize; 3]>) -> isize[src]
Implementors
impl NdIndex<Dim<IxDynImpl>> for Dim<[usize; 0]>[src]
pub fn index_checked(
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>[src]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
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]
&self,
dim: &Dim<IxDynImpl>,
strides: &Dim<IxDynImpl>
) -> Option<isize>
pub fn index_unchecked(&self, strides: &Dim<IxDynImpl>) -> isize[src]
impl<D> NdIndex<D> for D where
D: Dimension, [src]
D: Dimension,