[][src]Trait building_blocks::prelude::Array

pub trait Array<N> {
    type Indexer: ArrayIndexer<N>;
    fn extent(&self) -> &ExtentN<N>;

    fn for_each_point_and_stride(
        &self,
        extent: &ExtentN<N>,
        f: impl FnMut(PointN<N>, Stride)
    ) { ... }
fn stride_from_local_point(&self, p: &Local<N>) -> Stride { ... }
fn strides_from_local_points(
        &self,
        points: &[Local<N>],
        strides: &mut [Stride]
    ) { ... } }

When a lattice map implements Array, 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 ArrayN.

Associated Types

Loading content...

Required methods

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

Loading content...

Provided methods

fn for_each_point_and_stride(
    &self,
    extent: &ExtentN<N>,
    f: impl FnMut(PointN<N>, Stride)
)

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

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

Loading content...

Implementors

impl<'a, N, M, F> Array<N> for TransformMap<'a, M, F> where
    M: Array<N>, 
[src]

type Indexer = <M as Array<N>>::Indexer

impl<N, T> Array<N> for ArrayN<N, T> where
    N: ArrayIndexer<N>, 
[src]

type Indexer = N

Loading content...