Trait beagle::consts::Array [] [src]

pub trait Array<T>: Constant {
    type RawType;
    type Type;
    fn from_value(v: T) -> Self::Type
    where
        T: Clone
; fn apply<F: FnMut(T)>(a0: Self::Type, f: F); fn apply2<U, F>(a0: Self::Type, a1: Self::Type, f: F)
    where
        Self: Array<U>,
        F: FnMut(T, U)
; fn fold<O, F>(a0: Self::Type, init: O, f: F) -> O
    where
        F: FnMut(O, T) -> O
; fn fold2<U, O, F>(a0: Self::Type, a1: Self::Type, init: O, f: F) -> O
    where
        Self: Array<U>,
        F: FnMut(O, T, U) -> O
; fn map<O, F>(a0: Self::Type, f: F) -> Self::Type
    where
        Self: Array<O>,
        F: FnMut(T) -> O
; fn map_into_2<O1, O2, F>(a0: Self::Type, f: F) -> (Self::Type, Self::Type)
    where
        Self: Array<O1> + Array<O2>,
        F: FnMut(T) -> (O1, O2)
; fn map2<U, O, F>(a0: Self::Type, a1: Self::Type, f: F) -> Self::Type
    where
        Self: Array<U> + Array<O>,
        F: FnMut(T, U) -> O
; fn map3<T2, T3, O, F>(
        a0: Self::Type,
        a1: Self::Type,
        a2: Self::Type,
        f: F
    ) -> Self::Type
    where
        Self: Array<T2> + Array<T3> + Array<O>,
        F: FnMut(T, T2, T3) -> O
; fn transpose<U, S>(a0: Self::Type) -> <U as Array<Self::Type>>::Type
    where
        Self: Array<S>,
        U: Dim<S, Type = T> + Dim<Self::Type>,
        U::Smaller: Array<S> + Array<Self::Type>
; fn transpose_helper<U>(a0: <U as Array<Self::Type>>::Type) -> Self::Type
    where
        U: Array<Self::Type> + Array<T>,
        Self: Array<<U as Array<T>>::Type>
; }

Types that represent an array

Associated Types

A raw array of the size equal to the dimension this type represents.

A custom array of the size equal to the dimension this type represents.

Required Methods

Construct an array from a single value v, replicating it to all positions in the array.

Apply f to all the elements of the array

Apply f to all elements of two arrays.

Fold all the elements of the array with function f

Fold all the elements of two arrays with function f

Map all the elements of the array with function f

Map all the elements into two arrays with function f

Map all the elements of two arrays with function f

Map all the elements of three arrays with function f

Transpose the elements of a 2d array

A helper to transpose the elements of a 2d array (recursion)

Implementors