Trait IndexedArray

Source
pub trait IndexedArray<N> {
    type Indexer: ArrayIndexer<N>;

    // Required method
    fn extent(&self) -> &ExtentN<N>;

    // Provided methods
    fn stride_from_local_point(&self, p: Local<N>) -> Stride
       where PointN<N>: Copy { ... }
    fn strides_from_local_points(
        &self,
        points: &[Local<N>],
        strides: &mut [Stride],
    )
       where PointN<N>: Copy { ... }
}
Expand description

When a lattice map implements IndexedArray, that means there is some underlying array with the location and shape dictated by the extent.

For the sake of generic impls, if the same map also implements Get*<Stride>, it must use the same data layout as Array.

Required Associated Types§

Required Methods§

Source

fn extent(&self) -> &ExtentN<N>

Provided Methods§

Source

fn stride_from_local_point(&self, p: Local<N>) -> Stride
where PointN<N>: Copy,

Source

fn strides_from_local_points(&self, points: &[Local<N>], strides: &mut [Stride])
where PointN<N>: Copy,

Implementors§

Source§

impl<'a, N, Delegate, F> IndexedArray<N> for TransformMap<'a, Delegate, F>
where Delegate: IndexedArray<N>,

Source§

type Indexer = <Delegate as IndexedArray<N>>::Indexer

Source§

impl<N, Chan> IndexedArray<N> for Array<N, Chan>
where N: ArrayIndexer<N>,

OSZAR »