ella_tensor::shape

Trait Indexer

Source
pub trait Indexer<S>: Debug
where S: Shape,
{ // Required methods fn index_checked(&self, shape: &S, strides: &S) -> Option<isize>; fn index_unchecked(&self, shape: &S, strides: &S) -> isize; }

Required Methods§

Source

fn index_checked(&self, shape: &S, strides: &S) -> Option<isize>

Source

fn index_unchecked(&self, shape: &S, strides: &S) -> isize

Implementations on Foreign Types§

Source§

impl Indexer<Const<0>> for ()

Source§

fn index_checked(&self, shape: &Const<0>, strides: &Const<0>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<0>, strides: &Const<0>) -> isize

Source§

impl Indexer<Dyn> for ()

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A> Indexer<Const<1>> for (A,)
where A: IndexValue,

Source§

fn index_checked(&self, shape: &Const<1>, strides: &Const<1>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<1>, strides: &Const<1>) -> isize

Source§

impl<A> Indexer<Dyn> for (A,)
where A: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A, B> Indexer<Const<2>> for (A, B)
where A: IndexValue, B: IndexValue,

Source§

fn index_checked(&self, shape: &Const<2>, strides: &Const<2>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<2>, strides: &Const<2>) -> isize

Source§

impl<A, B> Indexer<Dyn> for (A, B)
where A: IndexValue, B: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A, B, C> Indexer<Const<3>> for (A, B, C)
where A: IndexValue, B: IndexValue, C: IndexValue,

Source§

fn index_checked(&self, shape: &Const<3>, strides: &Const<3>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<3>, strides: &Const<3>) -> isize

Source§

impl<A, B, C> Indexer<Dyn> for (A, B, C)
where A: IndexValue, B: IndexValue, C: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A, B, C, D> Indexer<Const<4>> for (A, B, C, D)

Source§

fn index_checked(&self, shape: &Const<4>, strides: &Const<4>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<4>, strides: &Const<4>) -> isize

Source§

impl<A, B, C, D> Indexer<Dyn> for (A, B, C, D)

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A, B, C, D, E> Indexer<Const<5>> for (A, B, C, D, E)

Source§

fn index_checked(&self, shape: &Const<5>, strides: &Const<5>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<5>, strides: &Const<5>) -> isize

Source§

impl<A, B, C, D, E> Indexer<Dyn> for (A, B, C, D, E)

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<A, B, C, D, E, F> Indexer<Const<6>> for (A, B, C, D, E, F)

Source§

fn index_checked(&self, shape: &Const<6>, strides: &Const<6>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<6>, strides: &Const<6>) -> isize

Source§

impl<A, B, C, D, E, F> Indexer<Dyn> for (A, B, C, D, E, F)

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Const<0>> for [I; 0]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<0>, strides: &Const<0>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<0>, strides: &Const<0>) -> isize

Source§

impl<I> Indexer<Const<1>> for [I; 1]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<1>, strides: &Const<1>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<1>, strides: &Const<1>) -> isize

Source§

impl<I> Indexer<Const<2>> for [I; 2]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<2>, strides: &Const<2>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<2>, strides: &Const<2>) -> isize

Source§

impl<I> Indexer<Const<3>> for [I; 3]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<3>, strides: &Const<3>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<3>, strides: &Const<3>) -> isize

Source§

impl<I> Indexer<Const<4>> for [I; 4]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<4>, strides: &Const<4>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<4>, strides: &Const<4>) -> isize

Source§

impl<I> Indexer<Const<5>> for [I; 5]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<5>, strides: &Const<5>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<5>, strides: &Const<5>) -> isize

Source§

impl<I> Indexer<Const<6>> for [I; 6]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Const<6>, strides: &Const<6>) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Const<6>, strides: &Const<6>) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 0]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 1]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 2]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 3]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 4]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 5]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<I> Indexer<Dyn> for [I; 6]
where I: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<T> Indexer<Dyn> for &[T]
where T: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Source§

impl<T> Indexer<Dyn> for Vec<T>
where T: IndexValue,

Source§

fn index_checked(&self, shape: &Dyn, strides: &Dyn) -> Option<isize>

Source§

fn index_unchecked(&self, shape: &Dyn, strides: &Dyn) -> isize

Implementors§

Source§

impl<'a, T, S> Indexer<S> for IndexUnchecked<'a, T>
where T: IndexValue, S: Shape,

Source§

impl<I> Indexer<Const<1>> for I
where I: IndexValue,

Source§

impl<S> Indexer<S> for Flat
where S: Shape,

Source§

impl<S> Indexer<S> for S
where S: Shape,