Trait ndarray::NdProducer[][src]

pub trait NdProducer {
    type Item;
    type Dim: Dimension;
    fn __private__(&self) -> PrivateMarker;
}

A producer of an n-dimensional set of elements; for example an array view, mutable array view or an iterator that yields chunks.

Producers are used as a arguments to Zip and azip!().

Comparison to IntoIterator

Most NdProducers are iterable (implement IntoIterator) but not directly iterators. This separation is needed because the producer represents a multidimensional set of items, it can be split along a particular axis for parallelization, and it has no fixed correspondance to a sequence.

The natural exception is one dimensional producers, like AxisIter, which implement Iterator directly (AxisIter traverses a one dimensional sequence, along an axis, while producing multidimensional items).

See also IntoNdProducer

Associated Types

type Item[src]

The element produced per iteration.

type Dim: Dimension[src]

Dimension type

Loading content...

Required methods

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

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

Loading content...

Implementors

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

type Item = Self::Item

type Dim = Ix1

type Ptr = *mut A

type Stride = isize

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

type Item = Self::Item

type Dim = Ix1

type Ptr = *mut A

type Stride = isize

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

type Item = ArrayView<'a, A, D>

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = ArrayViewMut<'a, A, D>

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = ArrayView<'a, A, Ix1>

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = ArrayViewMut<'a, A, Ix1>

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = ArrayView<'a, A, D>

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = &'a A

type Dim = D

type Ptr = *mut A

type Stride = isize

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

type Item = &'a mut A

type Dim = D

type Ptr = *mut A

type Stride = isize

impl<A, D: Dimension> NdProducer for RawArrayView<A, D>[src]

type Item = *const A

type Dim = D

type Ptr = *const A

type Stride = isize

impl<A, D: Dimension> NdProducer for RawArrayViewMut<A, D>[src]

type Item = *mut A

type Dim = D

type Ptr = *mut A

type Stride = isize

impl<D: Dimension + Copy> NdProducer for Indices<D>[src]

type Item = D::Pattern

type Dim = D

type Ptr = IndexPtr<D>

type Stride = usize

Loading content...