Struct orkhon::prelude::ops::nn::tract_ndarray::iter::AxisIter[][src]

pub struct AxisIter<'a, A, D> { /* fields omitted */ }

An iterator that traverses over an axis and and yields each subview.

The outermost dimension is Axis(0), created with .outer_iter(), but you can traverse arbitrary dimension with .axis_iter().

For example, in a 3 × 5 × 5 array, with axis equal to Axis(2), the iterator element is a 3 × 5 subview (and there are 5 in total).

Iterator element type is ArrayView<'a, A, D>.

See .outer_iter() or .axis_iter() for more information.

Implementations

impl<'a, A, D> AxisIter<'a, A, D> where
    D: Dimension
[src]

pub fn split_at(self, index: usize) -> (AxisIter<'a, A, D>, AxisIter<'a, A, D>)[src]

Splits the iterator at index, yielding two disjoint iterators.

index is relative to the current state of the iterator (which is not necessarily the start of the axis).

Panics if index is strictly greater than the iterator's remaining length.

Trait Implementations

impl<'a, A, D> Clone for AxisIter<'a, A, D> where
    D: Clone
[src]

impl<'a, A, D> Debug for AxisIter<'a, A, D> where
    A: Debug,
    D: Debug
[src]

impl<'a, A, D> DoubleEndedIterator for AxisIter<'a, A, D> where
    D: Dimension
[src]

impl<'a, A, D> ExactSizeIterator for AxisIter<'a, A, D> where
    D: Dimension
[src]

impl<'a, A, D> Iterator for AxisIter<'a, A, D> where
    D: Dimension
[src]

type Item = ArrayBase<ViewRepr<&'a A>, D>

The type of the elements being iterated over.

impl<'a, A, D> NdProducer for AxisIter<'a, A, D> where
    D: Dimension
[src]

type Item = <AxisIter<'a, A, D> as Iterator>::Item

The element produced per iteration.

type Dim = Dim<[usize; 1]>

Dimension type

type Ptr = *mut A

type Stride = isize

impl<'a, A, D> Send for AxisIter<'a, A, D> where
    A: Sync,
    D: Send
[src]

impl<'a, A, D> Sync for AxisIter<'a, A, D> where
    A: Sync,
    D: Sync
[src]

Auto Trait Implementations

impl<'a, A, D> RefUnwindSafe for AxisIter<'a, A, D> where
    A: RefUnwindSafe,
    D: RefUnwindSafe
[src]

impl<'a, A, D> Unpin for AxisIter<'a, A, D> where
    D: Unpin
[src]

impl<'a, A, D> UnwindSafe for AxisIter<'a, A, D> where
    A: RefUnwindSafe,
    D: UnwindSafe
[src]

Blanket Implementations

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

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

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

impl<T> Downcast for T where
    T: Any

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

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

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

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

impl<I> IntoIterator for I where
    I: Iterator
[src]

type Item = <I as Iterator>::Item

The type of the elements being iterated over.

type IntoIter = I

Which kind of iterator are we turning this into?

impl<P> IntoNdProducer for P where
    P: NdProducer
[src]

type Item = <P as NdProducer>::Item

The element produced per iteration.

type Dim = <P as NdProducer>::Dim

Dimension type of the producer

type Output = P

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<T> Itertools for T where
    T: Iterator + ?Sized
[src]

impl<D, A, I> MaybeProduct<D> for I where
    I: Iterator<Item = A>,
    A: Borrow<D>,
    D: DimLike

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

type Owned = T

The resulting type after obtaining ownership.

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.

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.