Trait ndarray::NdProducer[][src]

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

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

The element produced per iteration.

Dimension type

Required methods

Return the shape of the producer.

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

Implementors