Struct mdarray::Array

source ·
pub struct Array<B: ?Sized> { /* private fields */ }
Expand description

Multidimensional array type with static rank.

Implementations§

source§

impl<B: Buffer + ?Sized> Array<B>

source

pub fn as_span(&self) -> &Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Returns an array span of the entire array.

source§

impl<B: BufferMut + ?Sized> Array<B>

source

pub fn as_mut_span( &mut self ) -> &mut Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Returns a mutable array span of the entire array.

source§

impl<T, D: Dim, A: Allocator> Array<GridBuffer<T, D, A>>

source

pub fn append(&mut self, other: &mut Self)

Moves all elements from another array into the array along the outermost dimension.

Panics

Panics if the inner dimensions do not match.

source

pub fn capacity(&self) -> usize

Returns the number of elements the array can hold without reallocating.

source

pub fn clear(&mut self)

Clears the array, removing all values.

Note that this method has no effect on the allocated capacity of the array.

source

pub fn drain<R: RangeBounds<usize>>( &mut self, range: R ) -> Expression<Drain<'_, T, D, A>>

Removes the specified range from the array along the outermost dimension, and returns the removed range as an expression.

source

pub fn expand<I: IntoExpression>(&mut self, expr: I)
where I::Item: IntoCloned<T>,

Appends an expression to the array along the outermost dimension with broadcasting, cloning elements if needed.

If the rank of the expression equals one less than the rank of the array, the expression is assumed to have outermost dimension of size 1.

Panics

Panics if the inner dimensions do not match, or if the rank of the expression is not valid.

source

pub fn into_flattened(self) -> Array<GridBuffer<T, Const<1>, A>>

Converts the array into a one-dimensional array.

source

pub fn into_scalar(self) -> T

Converts an array with a single element into the contained value.

Panics

Panics if the array length is not equal to one.

source

pub fn into_shape<S: Shape>(self, shape: S) -> Array<GridBuffer<T, S::Dim, A>>

Converts the array into a reshaped array, which must have the same length.

Panics

Panics if the array length is changed.

source

pub fn into_vec(self) -> Vec<T>

Converts the array into a vector.

source

pub fn reserve(&mut self, additional: usize)

Reserves capacity for at least the additional number of elements in the array.

source

pub fn reserve_exact(&mut self, additional: usize)

Reserves the minimum capacity for the additional number of elements in the array.

source

pub fn resize(&mut self, new_shape: D::Shape, value: T)
where T: Clone, A: Clone,

Resizes the array to the new shape, creating new elements with the given value.

source

pub fn resize_with<F: FnMut() -> T>(&mut self, new_shape: D::Shape, f: F)
where A: Clone,

Resizes the array to the new shape, creating new elements from the given closure.

source

pub unsafe fn set_shape(&mut self, new_shape: D::Shape)

Forces the array shape to the new shape.

Safety

All elements within the array length must be initialized.

source

pub fn shrink_to(&mut self, min_capacity: usize)

Shrinks the capacity of the array with a lower bound.

source

pub fn shrink_to_fit(&mut self)

Shrinks the capacity of the array as much as possible.

source

pub fn spare_capacity_mut(&mut self) -> &mut [MaybeUninit<T>]

Returns the remaining spare capacity of the array as a slice of MaybeUninit<T>.

The returned slice can be used to fill the array with data, before marking the data as initialized using the set_shape method.

source

pub fn truncate(&mut self, size: usize)

Shortens the array along the outermost dimension, keeping the first size elements.

source

pub fn try_reserve(&mut self, additional: usize) -> Result<(), TryReserveError>

Tries to reserve capacity for at least the additional number of elements in the array.

Errors

If the capacity overflows, or the allocator reports a failure, then an error is returned.

source

pub fn try_reserve_exact( &mut self, additional: usize ) -> Result<(), TryReserveError>

Tries to reserve the minimum capacity for the additional number of elements in the array.

Errors

If the capacity overflows, or the allocator reports a failure, then an error is returned.

source§

impl<T, D: Dim> Array<GridBuffer<T, D, Global>>

source

pub fn from_elem(shape: D::Shape, elem: T) -> Self
where T: Clone,

Creates an array from the given element.

source

pub fn from_expr<I: IntoExpression<Item = T, Dim = D>>(expr: I) -> Self

Creates an array from the given expression.

source

pub fn from_fn<F: FnMut(D::Shape) -> T>(shape: D::Shape, f: F) -> Self

Creates an array with the results from the given function.

source

pub unsafe fn from_raw_parts( ptr: *mut T, shape: D::Shape, capacity: usize ) -> Self

Creates an array from raw components of another array.

Safety

The pointer must be a valid allocation given the shape and capacity.

source

pub fn into_raw_parts(self) -> (*mut T, D::Shape, usize)

Decomposes an array into its raw components.

source

pub fn new() -> Self

Creates a new, empty array.

source

pub fn with_capacity(capacity: usize) -> Self

Creates a new, empty array with the specified capacity.

source§

impl<T, D: Dim, L: Layout> Array<SpanBuffer<T, D, L>>

source

pub fn as_mut_ptr(&mut self) -> *mut T

Returns a mutable pointer to the array buffer.

source

pub fn as_ptr(&self) -> *const T

Returns a raw pointer to the array buffer.

source

pub fn assign<I: IntoExpression<Item = impl IntoCloned<T>>>(&mut self, expr: I)

Assigns an expression to the array span with broadcasting, cloning elements if needed.

Panics

Panics if the expression cannot be broadcast to the shape of the array span.

source

pub fn axis_expr<const DIM: usize>( &self ) -> Expression<AxisExpr<'_, T, D, <Const<DIM> as Axis<D>>::Remove<L>>>
where Const<DIM>: Axis<D>,

Returns an expression that gives array views iterating over the specified dimension.

When iterating over the outermost dimension, both the unit inner stride and the uniform stride properties are maintained, and the resulting array views have the same layout.

When iterating over the innermost dimension, the uniform stride property is maintained but not unit inner stride, and the resulting array views have flat or strided layout.

When iterating over the other dimensions, the unit inner stride propery is maintained but not uniform stride, and the resulting array views have general or strided layout.

source

pub fn axis_expr_mut<const DIM: usize>( &mut self ) -> Expression<AxisExprMut<'_, T, D, <Const<DIM> as Axis<D>>::Remove<L>>>
where Const<DIM>: Axis<D>,

Returns a mutable expression that gives array views iterating over the specified dimension.

When iterating over the outermost dimension, both the unit inner stride and the uniform stride properties are maintained, and the resulting array views have the same layout.

When iterating over the innermost dimension, the uniform stride property is maintained but not unit inner stride, and the resulting array views have flat or strided layout.

When iterating over the other dimensions, the unit inner stride propery is maintained but not uniform stride, and the resulting array views have general or strided layout.

source

pub fn cols(&self) -> Expression<Lanes<'_, T, D, L::Uniform>>

Returns an expression that gives column views iterating over the other dimensions.

Panics

Panics if the rank is not at least 1.

source

pub fn cols_mut(&mut self) -> Expression<LanesMut<'_, T, D, L::Uniform>>

Returns a mutable expression that gives column views iterating over the other dimensions.

Panics

Panics if the rank is not at least 1.

source

pub fn contains(&self, x: &T) -> bool
where T: PartialEq,

Returns true if the array span contains an element with the given value.

source

pub fn expr(&self) -> Expression<Expr<'_, T, D, L>>

Returns an expression over the array span.

source

pub fn expr_mut(&mut self) -> Expression<ExprMut<'_, T, D, L>>

Returns a mutable expression over the array span.

source

pub fn fill(&mut self, value: T)
where T: Clone,

Fills the array span with elements by cloning value.

source

pub fn fill_with<F: FnMut() -> T>(&mut self, f: F)

Fills the array span with elements returned by calling a closure repeatedly.

source

pub fn flatten(&self) -> Array<ViewBuffer<'_, T, Const<1>, L::Uniform>>

Returns a one-dimensional array view of the array span.

Panics

Panics if the array layout is not uniformly strided.

source

pub fn flatten_mut( &mut self ) -> Array<ViewBufferMut<'_, T, Const<1>, L::Uniform>>

Returns a mutable one-dimensional array view over the array span.

Panics

Panics if the array layout is not uniformly strided.

source

pub unsafe fn get_unchecked<I: SpanIndex<T, D, L>>( &self, index: I ) -> &I::Output

Returns a reference to an element or a subslice, without doing bounds checking.

Safety

The index must be within bounds of the array span.

source

pub unsafe fn get_unchecked_mut<I: SpanIndex<T, D, L>>( &mut self, index: I ) -> &mut I::Output

Returns a mutable reference to an element or a subslice, without doing bounds checking.

Safety

The index must be within bounds of the array span.

source

pub fn is_contiguous(&self) -> bool

Returns true if the array strides are consistent with contiguous memory layout.

source

pub fn is_empty(&self) -> bool

Returns true if the array contains no elements.

source

pub fn is_uniformly_strided(&self) -> bool

Returns true if the array strides are consistent with uniformly strided memory layout.

source

pub fn iter(&self) -> Iter<Expr<'_, T, D, L>>

Returns an iterator over the array span.

source

pub fn iter_mut(&mut self) -> Iter<ExprMut<'_, T, D, L>>

Returns a mutable iterator over the array span.

source

pub fn lanes<const DIM: usize>( &self ) -> Expression<Lanes<'_, T, D, <Const<DIM> as Axis<D>>::Keep<L>>>
where Const<DIM>: Axis<D>,

Returns an expression that gives array views over the specified dimension, iterating over the other dimensions.

If the innermost dimension is specified, the resulting array views have dense or flat layout. For other dimensions, the resulting array views have flat layout.

source

pub fn lanes_mut<const DIM: usize>( &mut self ) -> Expression<LanesMut<'_, T, D, <Const<DIM> as Axis<D>>::Keep<L>>>
where Const<DIM>: Axis<D>,

Returns a mutable expression that gives array views over the specified dimension, iterating over the other dimensions.

If the innermost dimension is specified, the resulting array views have dense or flat layout. For other dimensions, the resulting array views have flat layout.

source

pub fn len(&self) -> usize

Returns the number of elements in the array.

source

pub fn mapping(&self) -> L::Mapping<D>

Returns the array layout mapping.

source

pub fn outer_expr( &self ) -> Expression<AxisExpr<'_, T, D, <D::Lower as Dim>::Layout<L>>>

Returns an expression that gives array views iterating over the outermost dimension.

Iterating over the outermost dimension maintains both the unit inner stride and the uniform stride properties, and the resulting array views have the same layout.

Panics

Panics if the rank is not at least 1.

source

pub fn outer_expr_mut( &mut self ) -> Expression<AxisExprMut<'_, T, D, <D::Lower as Dim>::Layout<L>>>

Returns a mutable expression that gives array views iterating over the outermost dimension.

Iterating over the outermost dimension maintains both the unit inner stride and the uniform stride properties, and the resulting array views have the same layout.

Panics

Panics if the rank is not at least 1.

source

pub fn rank(&self) -> usize

Returns the array rank, i.e. the number of dimensions.

source

pub fn remap<M: Layout>(&self) -> Array<ViewBuffer<'_, T, D, M>>

Returns a remapped array view of the array span.

Panics

Panics if the memory layout is not compatible with the new array layout.

source

pub fn remap_mut<M: Layout>(&mut self) -> Array<ViewBufferMut<'_, T, D, M>>

Returns a mutable remapped array view of the array span.

Panics

Panics if the memory layout is not compatible with the new array layout.

source

pub fn reshape<S: Shape>( &self, shape: S ) -> Array<ViewBuffer<'_, T, S::Dim, <S::Dim as Dim>::Layout<L>>>

Returns a reshaped array view of the array span, with similar layout.

Panics

Panics if the array length is changed, or the memory layout is not compatible.

source

pub fn reshape_mut<S: Shape>( &mut self, shape: S ) -> Array<ViewBufferMut<'_, T, S::Dim, <S::Dim as Dim>::Layout<L>>>

Returns a mutable reshaped array view of the array span, with similar layout.

Panics

Panics if the array length is changed, or the memory layout is not compatible.

source

pub fn rows(&self) -> Expression<Lanes<'_, T, D, Flat>>

Returns an expression that gives row views iterating over the other dimensions.

Panics

Panics if the rank is not at least 2.

source

pub fn rows_mut(&mut self) -> Expression<LanesMut<'_, T, D, Flat>>

Returns a mutable expression that gives row views iterating over the other dimensions.

Panics

Panics if the rank is not at least 2.

source

pub fn shape(&self) -> D::Shape

Returns the shape of the array.

source

pub fn size(&self, dim: usize) -> usize

Returns the number of elements in the specified dimension.

Panics

Panics if the dimension is out of bounds.

source

pub fn split_at( &self, mid: usize ) -> (Array<ViewBuffer<'_, T, D, L>>, Array<ViewBuffer<'_, T, D, L>>)

Divides an array span into two at an index along the outermost dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn split_at_mut( &mut self, mid: usize ) -> (Array<ViewBufferMut<'_, T, D, L>>, Array<ViewBufferMut<'_, T, D, L>>)

Divides a mutable array span into two at an index along the outermost dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn split_axis_at<const DIM: usize>( &self, mid: usize ) -> (Array<ViewBuffer<'_, T, D, <Const<DIM> as Axis<D>>::Split<L>>>, Array<ViewBuffer<'_, T, D, <Const<DIM> as Axis<D>>::Split<L>>>)
where Const<DIM>: Axis<D>,

Divides an array span into two at an index along the specified dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn split_axis_at_mut<const DIM: usize>( &mut self, mid: usize ) -> (Array<ViewBufferMut<'_, T, D, <Const<DIM> as Axis<D>>::Split<L>>>, Array<ViewBufferMut<'_, T, D, <Const<DIM> as Axis<D>>::Split<L>>>)
where Const<DIM>: Axis<D>,

Divides a mutable array span into two at an index along the specified dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn stride(&self, dim: usize) -> isize

Returns the distance between elements in the specified dimension.

Panics

Panics if the dimension is out of bounds.

source

pub fn strides(&self) -> D::Strides

Returns the distance between elements in each dimension.

source

pub fn to_grid(&self) -> Array<GridBuffer<T, D, Global>>
where T: Clone,

Copies the array span into a new array.

source

pub fn to_vec(&self) -> Vec<T>
where T: Clone,

Copies the array span into a new vector.

source

pub fn to_view(&self) -> Array<ViewBuffer<'_, T, D, L>>

Returns an array view of the entire array span.

source

pub fn to_view_mut(&mut self) -> Array<ViewBufferMut<'_, T, D, L>>

Returns a mutable array view of the entire array span.

source§

impl<T, D: Dim> Array<SpanBuffer<T, D, Dense>>

source

pub fn as_mut_slice(&mut self) -> &mut [T]

Returns a mutable slice of all elements in the array, which must have dense layout.

source

pub fn as_slice(&self) -> &[T]

Returns a slice of all elements in the array, which must have dense layout.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<2>, L>>

source

pub fn col( &self, index: usize ) -> Array<ViewBuffer<'_, T, Const<1>, L::Uniform>>

Returns an array view for the specified column.

Panics

Panics if the index is out of bounds.

source

pub fn col_mut( &mut self, index: usize ) -> Array<ViewBufferMut<'_, T, Const<1>, L::Uniform>>

Returns a mutable array view for the specified column.

Panics

Panics if the index is out of bounds.

source

pub fn diag(&self, index: isize) -> Array<ViewBuffer<'_, T, Const<1>, Flat>>

Returns an array view for the given diagonal of the array span, where index > 0 is above and index < 0 is below the main diagonal.

Panics

Panics if the absolute index is larger than the number of columns or rows.

source

pub fn diag_mut( &mut self, index: isize ) -> Array<ViewBufferMut<'_, T, Const<1>, Flat>>

Returns a mutable array view for the given diagonal of the array span, where index > 0 is above and index < 0 is below the main diagonal.

Panics

Panics if the absolute index is larger than the number of columns or rows.

source

pub fn row(&self, index: usize) -> Array<ViewBuffer<'_, T, Const<1>, Flat>>

Returns an array view for the specified row.

Panics

Panics if the index is out of bounds.

source

pub fn row_mut( &mut self, index: usize ) -> Array<ViewBufferMut<'_, T, Const<1>, Flat>>

Returns a mutable array view for the specified row.

Panics

Panics if the index is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<1>, <(Const<X>,) as Permutation>::Layout<L>>>
where (Const<X>,): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<1>, <(Const<X>,) as Permutation>::Layout<L>>>
where (Const<X>,): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize, const Y: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<2>, <(Const<X>, Const<Y>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize, const Y: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<2>, <(Const<X>, Const<Y>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize, const Y: usize, const Z: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<3>, <(Const<X>, Const<Y>, Const<Z>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize, const Y: usize, const Z: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<3>, <(Const<X>, Const<Y>, Const<Z>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize, const Y: usize, const Z: usize, const W: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<4>, <(Const<X>, Const<Y>, Const<Z>, Const<W>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize, const Y: usize, const Z: usize, const W: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<4>, <(Const<X>, Const<Y>, Const<Z>, Const<W>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<5>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<5>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn permute<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize>( &self ) -> Array<ViewBuffer<'_, T, Const<6>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>): Permutation,

Returns an array view with the dimensions permuted.

source

pub fn permute_mut<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize>( &mut self ) -> Array<ViewBufferMut<'_, T, Const<6>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>): Permutation,

Returns a mutable array view with the dimensions permuted.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex>( &self, x: X ) -> Array<GridBuffer<T, <(X,) as ViewIndex<Const<1>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex>( &self, x: X ) -> Array<ViewBuffer<'_, T, <(X,) as ViewIndex<Const<1>, L>>::Dim, <(X,) as ViewIndex<Const<1>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex>( &mut self, x: X ) -> Array<ViewBufferMut<'_, T, <(X,) as ViewIndex<Const<1>, L>>::Dim, <(X,) as ViewIndex<Const<1>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex, Y: DimIndex>( &self, x: X, y: Y ) -> Array<GridBuffer<T, <(X, Y) as ViewIndex<Const<2>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex, Y: DimIndex>( &self, x: X, y: Y ) -> Array<ViewBuffer<'_, T, <(X, Y) as ViewIndex<Const<2>, L>>::Dim, <(X, Y) as ViewIndex<Const<2>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex, Y: DimIndex>( &mut self, x: X, y: Y ) -> Array<ViewBufferMut<'_, T, <(X, Y) as ViewIndex<Const<2>, L>>::Dim, <(X, Y) as ViewIndex<Const<2>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex, Y: DimIndex, Z: DimIndex>( &self, x: X, y: Y, z: Z ) -> Array<GridBuffer<T, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex, Y: DimIndex, Z: DimIndex>( &self, x: X, y: Y, z: Z ) -> Array<ViewBuffer<'_, T, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Dim, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex, Y: DimIndex, Z: DimIndex>( &mut self, x: X, y: Y, z: Z ) -> Array<ViewBufferMut<'_, T, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Dim, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex>( &self, x: X, y: Y, z: Z, w: W ) -> Array<GridBuffer<T, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex>( &self, x: X, y: Y, z: Z, w: W ) -> Array<ViewBuffer<'_, T, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Dim, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex>( &mut self, x: X, y: Y, z: Z, w: W ) -> Array<ViewBufferMut<'_, T, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Dim, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex>( &self, x: X, y: Y, z: Z, w: W, u: U ) -> Array<GridBuffer<T, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex>( &self, x: X, y: Y, z: Z, w: W, u: U ) -> Array<ViewBuffer<'_, T, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Dim, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex>( &mut self, x: X, y: Y, z: Z, w: W, u: U ) -> Array<ViewBufferMut<'_, T, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Dim, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<T, L: Layout> Array<SpanBuffer<T, Const<$n>, L>>

source

pub fn grid<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex, V: DimIndex>( &self, x: X, y: Y, z: Z, w: W, u: U, v: V ) -> Array<GridBuffer<T, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Dim, Global>>
where T: Clone,

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

source

pub fn view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex, V: DimIndex>( &self, x: X, y: Y, z: Z, w: W, u: U, v: V ) -> Array<ViewBuffer<'_, T, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Dim, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Layout>>

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source

pub fn view_mut<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex, V: DimIndex>( &mut self, x: X, y: Y, z: Z, w: W, u: U, v: V ) -> Array<ViewBufferMut<'_, T, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Dim, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Layout>>

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, D: Dim, L: Layout> Array<ViewBuffer<'a, T, D, L>>

source

pub fn into_flattened(self) -> Array<ViewBuffer<'a, T, Const<1>, L::Uniform>>

Converts the array view into a one-dimensional array view.

Panics

Panics if the array layout is not uniformly strided.

source

pub fn into_mapping<M: Layout>(self) -> Array<ViewBuffer<'a, T, D, M>>

Converts the array view into a remapped array view.

Panics

Panics if the memory layout is not compatible with the new array layout.

source

pub fn into_shape<S: Shape>( self, shape: S ) -> Array<ViewBuffer<'a, T, S::Dim, <S::Dim as Dim>::Layout<L>>>

Converts the array view into a reshaped array view with similar layout.

Panics

Panics if the array length is changed, or the memory layout is not compatible.

source

pub fn into_split_at( self, mid: usize ) -> (Array<ViewBuffer<'a, T, D, L>>, Array<ViewBuffer<'a, T, D, L>>)

Divides the array view into two at an index along the outermost dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn into_split_axis_at<const DIM: usize>( self, mid: usize ) -> (Array<ViewBuffer<'a, T, D, <Const<DIM> as Axis<D>>::Split<L>>>, Array<ViewBuffer<'a, T, D, <Const<DIM> as Axis<D>>::Split<L>>>)
where Const<DIM>: Axis<D>,

Divides the array view into two at an index along the specified dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub unsafe fn new_unchecked(ptr: *const T, mapping: L::Mapping<D>) -> Self

Creates an array view from a raw pointer and layout.

Safety

The pointer must be non-null and a valid array view for the given layout.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<2>, L>>

source

pub fn into_diag(self, index: isize) -> Array<ViewBuffer<'a, T, Const<1>, Flat>>

Converts the array view into a new array view for the given diagonal, where index > 0 is above and index < 0 is below the main diagonal.

Panics

Panics if the absolute index is larger than the number of columns or rows.

source§

impl<'a, T, D: Dim> Array<ViewBuffer<'a, T, D, Dense>>

source

pub fn into_slice(self) -> &'a [T]

Converts the array view into a slice of all elements, where the array view must have dense layout.

source§

impl<'a, T, D: Dim, L: Layout> Array<ViewBufferMut<'a, T, D, L>>

source

pub fn into_flattened(self) -> Array<ViewBufferMut<'a, T, Const<1>, L::Uniform>>

Converts the array view into a one-dimensional array view.

Panics

Panics if the array layout is not uniformly strided.

source

pub fn into_mapping<M: Layout>(self) -> Array<ViewBufferMut<'a, T, D, M>>

Converts the array view into a remapped array view.

Panics

Panics if the memory layout is not compatible with the new array layout.

source

pub fn into_shape<S: Shape>( self, shape: S ) -> Array<ViewBufferMut<'a, T, S::Dim, <S::Dim as Dim>::Layout<L>>>

Converts the array view into a reshaped array view with similar layout.

Panics

Panics if the array length is changed, or the memory layout is not compatible.

source

pub fn into_split_at( self, mid: usize ) -> (Array<ViewBufferMut<'a, T, D, L>>, Array<ViewBufferMut<'a, T, D, L>>)

Divides the array view into two at an index along the outermost dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub fn into_split_axis_at<const DIM: usize>( self, mid: usize ) -> (Array<ViewBufferMut<'a, T, D, <Const<DIM> as Axis<D>>::Split<L>>>, Array<ViewBufferMut<'a, T, D, <Const<DIM> as Axis<D>>::Split<L>>>)
where Const<DIM>: Axis<D>,

Divides the array view into two at an index along the specified dimension.

Panics

Panics if the split point is larger than the number of elements in that dimension.

source

pub unsafe fn new_unchecked(ptr: *mut T, mapping: L::Mapping<D>) -> Self

Creates an array view from a raw pointer and layout.

Safety

The pointer must be non-null and a valid array view for the given layout.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<2>, L>>

source

pub fn into_diag( self, index: isize ) -> Array<ViewBufferMut<'a, T, Const<1>, Flat>>

Converts the array view into a new array view for the given diagonal, where index > 0 is above and index < 0 is below the main diagonal.

Panics

Panics if the absolute index is larger than the number of columns or rows.

source§

impl<'a, T, D: Dim> Array<ViewBufferMut<'a, T, D, Dense>>

source

pub fn into_slice(self) -> &'a mut [T]

Converts the array view into a slice of all elements, where the array view must have dense layout.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize>( self ) -> Array<ViewBuffer<'a, T, Const<1>, <(Const<X>,) as Permutation>::Layout<L>>>
where (Const<X>,): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<1>, <(Const<X>,) as Permutation>::Layout<L>>>
where (Const<X>,): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize>( self ) -> Array<ViewBuffer<'a, T, Const<2>, <(Const<X>, Const<Y>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<2>, <(Const<X>, Const<Y>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize>( self ) -> Array<ViewBuffer<'a, T, Const<3>, <(Const<X>, Const<Y>, Const<Z>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<3>, <(Const<X>, Const<Y>, Const<Z>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize>( self ) -> Array<ViewBuffer<'a, T, Const<4>, <(Const<X>, Const<Y>, Const<Z>, Const<W>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<4>, <(Const<X>, Const<Y>, Const<Z>, Const<W>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize>( self ) -> Array<ViewBuffer<'a, T, Const<5>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<5>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize>( self ) -> Array<ViewBuffer<'a, T, Const<6>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_permuted<const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize>( self ) -> Array<ViewBufferMut<'a, T, Const<6>, <(Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>) as Permutation>::Layout<L>>>
where (Const<X>, Const<Y>, Const<Z>, Const<W>, Const<U>, Const<V>): Permutation,

Converts the array view into a new array view with the dimensions permuted.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex>( self, x: X ) -> Array<ViewBuffer<'a, T, <(X,) as ViewIndex<Const<1>, L>>::Dim, <(X,) as ViewIndex<Const<1>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex>( self, x: X ) -> Array<ViewBufferMut<'a, T, <(X,) as ViewIndex<Const<1>, L>>::Dim, <(X,) as ViewIndex<Const<1>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex>( self, x: X, y: Y ) -> Array<ViewBuffer<'a, T, <(X, Y) as ViewIndex<Const<2>, L>>::Dim, <(X, Y) as ViewIndex<Const<2>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex>( self, x: X, y: Y ) -> Array<ViewBufferMut<'a, T, <(X, Y) as ViewIndex<Const<2>, L>>::Dim, <(X, Y) as ViewIndex<Const<2>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex>( self, x: X, y: Y, z: Z ) -> Array<ViewBuffer<'a, T, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Dim, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex>( self, x: X, y: Y, z: Z ) -> Array<ViewBufferMut<'a, T, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Dim, <(X, Y, Z) as ViewIndex<Const<3>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex>( self, x: X, y: Y, z: Z, w: W ) -> Array<ViewBuffer<'a, T, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Dim, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex>( self, x: X, y: Y, z: Z, w: W ) -> Array<ViewBufferMut<'a, T, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Dim, <(X, Y, Z, W) as ViewIndex<Const<4>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex>( self, x: X, y: Y, z: Z, w: W, u: U ) -> Array<ViewBuffer<'a, T, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Dim, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex>( self, x: X, y: Y, z: Z, w: W, u: U ) -> Array<ViewBufferMut<'a, T, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Dim, <(X, Y, Z, W, U) as ViewIndex<Const<5>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBuffer<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex, V: DimIndex>( self, x: X, y: Y, z: Z, w: W, u: U, v: V ) -> Array<ViewBuffer<'a, T, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Dim, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

source§

impl<'a, T, L: Layout> Array<ViewBufferMut<'a, T, Const<$n>, L>>

source

pub fn into_view<X: DimIndex, Y: DimIndex, Z: DimIndex, W: DimIndex, U: DimIndex, V: DimIndex>( self, x: X, y: Y, z: Z, w: W, u: U, v: V ) -> Array<ViewBufferMut<'a, T, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Dim, <(X, Y, Z, W, U, V) as ViewIndex<Const<6>, L>>::Layout>>

Converts the array view into a new array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

Trait Implementations§

source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Add<I> for &Array<B>
where for<'a> &'a B::Item: Add<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the + operator.
source§

fn add(self, rhs: I) -> Self::Output

Performs the + operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Add<I> for Array<GridBuffer<T, D, A>>
where T: Add<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the + operator.
source§

fn add(self, rhs: I) -> Self

Performs the + operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Add<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Add<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the + operator.
source§

fn add(self, rhs: I) -> Self::Output

Performs the + operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> AddAssign<I> for Array<B>
where B::Item: AddAssign<I::Item>,

source§

fn add_assign(&mut self, rhs: I)

Performs the += operation. Read more
source§

impl<'a, T, B: Buffer + ?Sized> Apply<T> for &'a Array<B>

§

type Output = Array<GridBuffer<T, <B as Buffer>::Dim, Global>>

The resulting type after applying a closure.
§

type ZippedWith<I: IntoExpression> = Array<GridBuffer<T, <<B as Buffer>::Dim as Dim>::Max<<I as IntoExpression>::Dim>, Global>>

The resulting type after zipping elements and applying a closure.
source§

fn apply<F: FnMut(Self::Item) -> T>(self, f: F) -> Self::Output

Returns a new or an existing array with the given closure applied to each element.
source§

fn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I>
where F: FnMut(Self::Item, I::Item) -> T,

Returns a new or an existing array with the given closure applied to zipped element pairs.
source§

impl<'a, T, B: BufferMut + ?Sized> Apply<T> for &'a mut Array<B>

§

type Output = Array<GridBuffer<T, <B as Buffer>::Dim, Global>>

The resulting type after applying a closure.
§

type ZippedWith<I: IntoExpression> = Array<GridBuffer<T, <<B as Buffer>::Dim as Dim>::Max<<I as IntoExpression>::Dim>, Global>>

The resulting type after zipping elements and applying a closure.
source§

fn apply<F: FnMut(Self::Item) -> T>(self, f: F) -> Self::Output

Returns a new or an existing array with the given closure applied to each element.
source§

fn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I>
where F: FnMut(Self::Item, I::Item) -> T,

Returns a new or an existing array with the given closure applied to zipped element pairs.
source§

impl<T, D: Dim, A: Allocator> Apply<T> for Array<GridBuffer<T, D, A>>

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying a closure.
§

type ZippedWith<I: IntoExpression> = Array<GridBuffer<T, D, A>>

The resulting type after zipping elements and applying a closure.
source§

fn apply<F: FnMut(T) -> T>(self, f: F) -> Array<GridBuffer<T, D, A>>

Returns a new or an existing array with the given closure applied to each element.
source§

fn zip_with<I: IntoExpression, F>( self, expr: I, f: F ) -> Array<GridBuffer<T, D, A>>
where F: FnMut(T, I::Item) -> T,

Returns a new or an existing array with the given closure applied to zipped element pairs.
source§

impl<'a, T, U, D: Dim, L: Layout> Apply<U> for Array<ViewBuffer<'a, T, D, L>>

§

type Output = Array<GridBuffer<U, D, Global>>

The resulting type after applying a closure.
§

type ZippedWith<I: IntoExpression> = Array<GridBuffer<U, <D as Dim>::Max<<I as IntoExpression>::Dim>, Global>>

The resulting type after zipping elements and applying a closure.
source§

fn apply<F: FnMut(&'a T) -> U>(self, f: F) -> Self::Output

Returns a new or an existing array with the given closure applied to each element.
source§

fn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I>
where F: FnMut(&'a T, I::Item) -> U,

Returns a new or an existing array with the given closure applied to zipped element pairs.
source§

impl<'a, T, U, D: Dim, L: Layout> Apply<U> for Array<ViewBufferMut<'a, T, D, L>>

§

type Output = Array<GridBuffer<U, D, Global>>

The resulting type after applying a closure.
§

type ZippedWith<I: IntoExpression> = Array<GridBuffer<U, <D as Dim>::Max<<I as IntoExpression>::Dim>, Global>>

The resulting type after zipping elements and applying a closure.
source§

fn apply<F: FnMut(&'a mut T) -> U>(self, f: F) -> Self::Output

Returns a new or an existing array with the given closure applied to each element.
source§

fn zip_with<I: IntoExpression, F>(self, expr: I, f: F) -> Self::ZippedWith<I>
where F: FnMut(&'a mut T, I::Item) -> U,

Returns a new or an existing array with the given closure applied to zipped element pairs.
source§

impl<B: BufferMut<Layout = Dense> + ?Sized> AsMut<[<B as Buffer>::Item]> for Array<B>

source§

fn as_mut(&mut self) -> &mut [B::Item]

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<B: BufferMut + ?Sized> AsMut<Array<SpanBuffer<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>> for Array<B>

source§

fn as_mut(&mut self) -> &mut Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl<B: Buffer<Layout = Dense> + ?Sized> AsRef<[<B as Buffer>::Item]> for Array<B>

source§

fn as_ref(&self) -> &[B::Item]

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<B: Buffer + ?Sized> AsRef<Array<SpanBuffer<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>> for Array<B>

source§

fn as_ref(&self) -> &Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> BitAnd<I> for &Array<B>
where for<'a> &'a B::Item: BitAnd<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: I) -> Self::Output

Performs the & operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> BitAnd<I> for Array<GridBuffer<T, D, A>>
where T: BitAnd<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: I) -> Self

Performs the & operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> BitAnd<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: BitAnd<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the & operator.
source§

fn bitand(self, rhs: I) -> Self::Output

Performs the & operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> BitAndAssign<I> for Array<B>
where B::Item: BitAndAssign<I::Item>,

source§

fn bitand_assign(&mut self, rhs: I)

Performs the &= operation. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> BitOr<I> for &Array<B>
where for<'a> &'a B::Item: BitOr<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: I) -> Self::Output

Performs the | operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> BitOr<I> for Array<GridBuffer<T, D, A>>
where T: BitOr<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: I) -> Self

Performs the | operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> BitOr<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: BitOr<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the | operator.
source§

fn bitor(self, rhs: I) -> Self::Output

Performs the | operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> BitOrAssign<I> for Array<B>
where B::Item: BitOrAssign<I::Item>,

source§

fn bitor_assign(&mut self, rhs: I)

Performs the |= operation. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> BitXor<I> for &Array<B>
where for<'a> &'a B::Item: BitXor<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: I) -> Self::Output

Performs the ^ operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> BitXor<I> for Array<GridBuffer<T, D, A>>
where T: BitXor<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: I) -> Self

Performs the ^ operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> BitXor<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: BitXor<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the ^ operator.
source§

fn bitxor(self, rhs: I) -> Self::Output

Performs the ^ operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> BitXorAssign<I> for Array<B>
where B::Item: BitXorAssign<I::Item>,

source§

fn bitxor_assign(&mut self, rhs: I)

Performs the ^= operation. Read more
source§

impl<B: SizedBuffer> Borrow<Array<SpanBuffer<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>> for Array<B>

source§

fn borrow(&self) -> &Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Immutably borrows from an owned value. Read more
source§

impl<B: SizedBufferMut> BorrowMut<Array<SpanBuffer<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>> for Array<B>

source§

fn borrow_mut(&mut self) -> &mut Array<SpanBuffer<B::Item, B::Dim, B::Layout>>

Mutably borrows from an owned value. Read more
source§

impl<B: SizedBuffer + Clone> Clone for Array<B>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug, B: Buffer<Item = T> + ?Sized> Debug for Array<B>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T, D: Dim> Default for Array<GridBuffer<T, D, Global>>

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<B: SizedBuffer> Deref for Array<B>

§

type Target = Array<SpanBuffer<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl<B: SizedBufferMut> DerefMut for Array<B>

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Div<I> for &Array<B>
where for<'a> &'a B::Item: Div<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: I) -> Self::Output

Performs the / operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Div<I> for Array<GridBuffer<T, D, A>>
where T: Div<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: I) -> Self

Performs the / operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Div<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Div<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the / operator.
source§

fn div(self, rhs: I) -> Self::Output

Performs the / operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> DivAssign<I> for Array<B>
where B::Item: DivAssign<I::Item>,

source§

fn div_assign(&mut self, rhs: I)

Performs the /= operation. Read more
source§

impl<'a, T: 'a + Copy, A: Allocator> Extend<&'a T> for Array<GridBuffer<T, Const<1>, A>>

source§

fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<T, A: Allocator> Extend<T> for Array<GridBuffer<T, Const<1>, A>>

source§

fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I)

Extends a collection with the contents of an iterator. Read more
source§

fn extend_one(&mut self, item: A)

🔬This is a nightly-only experimental API. (extend_one)
Extends a collection with exactly one element.
source§

fn extend_reserve(&mut self, additional: usize)

🔬This is a nightly-only experimental API. (extend_one)
Reserves capacity in a collection for the given number of additional elements. Read more
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize> From<&'a [[[[[[T; X]; Y]; Z]; W]; U]; V]> for Array<ViewBuffer<'a, T, Const<6>, Dense>>

source§

fn from(array: &'a [[[[[[T; X]; Y]; Z]; W]; U]; V]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize> From<&'a [[[[[T; X]; Y]; Z]; W]; U]> for Array<ViewBuffer<'a, T, Const<5>, Dense>>

source§

fn from(array: &'a [[[[[T; X]; Y]; Z]; W]; U]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize> From<&'a [[[[T; X]; Y]; Z]; W]> for Array<ViewBuffer<'a, T, Const<4>, Dense>>

source§

fn from(array: &'a [[[[T; X]; Y]; Z]; W]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize> From<&'a [[[T; X]; Y]; Z]> for Array<ViewBuffer<'a, T, Const<3>, Dense>>

source§

fn from(array: &'a [[[T; X]; Y]; Z]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize> From<&'a [[T; X]; Y]> for Array<ViewBuffer<'a, T, Const<2>, Dense>>

source§

fn from(array: &'a [[T; X]; Y]) -> Self

Converts to this type from the input type.
source§

impl<T: Clone> From<&[T]> for Array<GridBuffer<T, Const<1>, Global>>

source§

fn from(slice: &[T]) -> Self

Converts to this type from the input type.
source§

impl<'a, T> From<&'a [T]> for Array<ViewBuffer<'a, T, Const<1>, Dense>>

source§

fn from(slice: &'a [T]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize> From<&'a [T; X]> for Array<ViewBuffer<'a, T, Const<1>, Dense>>

source§

fn from(array: &'a [T; X]) -> Self

Converts to this type from the input type.
source§

impl<'a, T> From<&'a T> for Array<ViewBuffer<'a, T, Const<0>, Dense>>

source§

fn from(value: &'a T) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize> From<&'a mut [[[[[[T; X]; Y]; Z]; W]; U]; V]> for Array<ViewBufferMut<'a, T, Const<6>, Dense>>

source§

fn from(array: &'a mut [[[[[[T; X]; Y]; Z]; W]; U]; V]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize> From<&'a mut [[[[[T; X]; Y]; Z]; W]; U]> for Array<ViewBufferMut<'a, T, Const<5>, Dense>>

source§

fn from(array: &'a mut [[[[[T; X]; Y]; Z]; W]; U]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize, const W: usize> From<&'a mut [[[[T; X]; Y]; Z]; W]> for Array<ViewBufferMut<'a, T, Const<4>, Dense>>

source§

fn from(array: &'a mut [[[[T; X]; Y]; Z]; W]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize, const Z: usize> From<&'a mut [[[T; X]; Y]; Z]> for Array<ViewBufferMut<'a, T, Const<3>, Dense>>

source§

fn from(array: &'a mut [[[T; X]; Y]; Z]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize, const Y: usize> From<&'a mut [[T; X]; Y]> for Array<ViewBufferMut<'a, T, Const<2>, Dense>>

source§

fn from(array: &'a mut [[T; X]; Y]) -> Self

Converts to this type from the input type.
source§

impl<'a, T> From<&'a mut [T]> for Array<ViewBufferMut<'a, T, Const<1>, Dense>>

source§

fn from(slice: &'a mut [T]) -> Self

Converts to this type from the input type.
source§

impl<'a, T, const X: usize> From<&'a mut [T; X]> for Array<ViewBufferMut<'a, T, Const<1>, Dense>>

source§

fn from(array: &'a mut [T; X]) -> Self

Converts to this type from the input type.
source§

impl<'a, T> From<&'a mut T> for Array<ViewBufferMut<'a, T, Const<0>, Dense>>

source§

fn from(value: &'a mut T) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize, const V: usize> From<[[[[[[T; X]; Y]; Z]; W]; U]; V]> for Array<GridBuffer<T, Const<6>, Global>>

source§

fn from(array: [[[[[[T; X]; Y]; Z]; W]; U]; V]) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize, const Y: usize, const Z: usize, const W: usize, const U: usize> From<[[[[[T; X]; Y]; Z]; W]; U]> for Array<GridBuffer<T, Const<5>, Global>>

source§

fn from(array: [[[[[T; X]; Y]; Z]; W]; U]) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize, const Y: usize, const Z: usize, const W: usize> From<[[[[T; X]; Y]; Z]; W]> for Array<GridBuffer<T, Const<4>, Global>>

source§

fn from(array: [[[[T; X]; Y]; Z]; W]) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize, const Y: usize, const Z: usize> From<[[[T; X]; Y]; Z]> for Array<GridBuffer<T, Const<3>, Global>>

source§

fn from(array: [[[T; X]; Y]; Z]) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize, const Y: usize> From<[[T; X]; Y]> for Array<GridBuffer<T, Const<2>, Global>>

source§

fn from(array: [[T; X]; Y]) -> Self

Converts to this type from the input type.
source§

impl<T, const X: usize> From<[T; X]> for Array<GridBuffer<T, Const<1>, Global>>

source§

fn from(array: [T; X]) -> Self

Converts to this type from the input type.
source§

impl<T, D: Dim, A: Allocator> From<Array<GridBuffer<T, D, A>>> for Vec<T>

source§

fn from(grid: Array<GridBuffer<T, D, A>>) -> Self

Converts to this type from the input type.
source§

impl<T, A: Allocator> From<Vec<T>> for Array<GridBuffer<T, Const<1>, A>>

source§

fn from(vec: Vec<T>) -> Self

Converts to this type from the input type.
source§

impl<T> FromIterator<T> for Array<GridBuffer<T, Const<1>, Global>>

source§

fn from_iter<I: IntoIterator<Item = T>>(iter: I) -> Self

Creates a value from an iterator. Read more
source§

impl<T: Hash, B: Buffer<Item = T> + ?Sized> Hash for Array<B>

source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
source§

impl<B: Buffer + ?Sized, I: SpanIndex<B::Item, B::Dim, B::Layout>> Index<I> for Array<B>

§

type Output = <I as SpanIndex<<B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>::Output

The returned type after indexing.
source§

fn index(&self, index: I) -> &I::Output

Performs the indexing (container[index]) operation. Read more
source§

impl<B: BufferMut + ?Sized, I: SpanIndex<B::Item, B::Dim, B::Layout>> IndexMut<I> for Array<B>

source§

fn index_mut(&mut self, index: I) -> &mut I::Output

Performs the mutable indexing (container[index]) operation. Read more
source§

impl<'a, B: Buffer + ?Sized> IntoExpression for &'a Array<B>

§

type Item = &'a <B as Buffer>::Item

Array element type.
§

type Dim = <B as Buffer>::Dim

Array dimension type.
§

type Producer = Expr<'a, <B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>

Which kind of expression producer are we turning this into?
source§

fn into_expr(self) -> Expression<Self::Producer>

Creates an expression from a value.
source§

impl<'a, B: BufferMut + ?Sized> IntoExpression for &'a mut Array<B>

§

type Item = &'a mut <B as Buffer>::Item

Array element type.
§

type Dim = <B as Buffer>::Dim

Array dimension type.
§

type Producer = ExprMut<'a, <B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>

Which kind of expression producer are we turning this into?
source§

fn into_expr(self) -> Expression<Self::Producer>

Creates an expression from a value.
source§

impl<T, D: Dim, A: Allocator> IntoExpression for Array<GridBuffer<T, D, A>>

§

type Item = T

Array element type.
§

type Dim = D

Array dimension type.
§

type Producer = IntoExpr<T, D, A>

Which kind of expression producer are we turning this into?
source§

fn into_expr(self) -> Expression<Self::Producer>

Creates an expression from a value.
source§

impl<'a, T, D: Dim, L: Layout> IntoExpression for Array<ViewBuffer<'a, T, D, L>>

§

type Item = &'a T

Array element type.
§

type Dim = D

Array dimension type.
§

type Producer = Expr<'a, T, D, L>

Which kind of expression producer are we turning this into?
source§

fn into_expr(self) -> Expression<Self::Producer>

Creates an expression from a value.
source§

impl<'a, T, D: Dim, L: Layout> IntoExpression for Array<ViewBufferMut<'a, T, D, L>>

§

type Item = &'a mut T

Array element type.
§

type Dim = D

Array dimension type.
§

type Producer = ExprMut<'a, T, D, L>

Which kind of expression producer are we turning this into?
source§

fn into_expr(self) -> Expression<Self::Producer>

Creates an expression from a value.
source§

impl<'a, B: Buffer + ?Sized> IntoIterator for &'a Array<B>

§

type Item = &'a <B as Buffer>::Item

The type of the elements being iterated over.
§

type IntoIter = Iter<Expr<'a, <B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, B: BufferMut + ?Sized> IntoIterator for &'a mut Array<B>

§

type Item = &'a mut <B as Buffer>::Item

The type of the elements being iterated over.
§

type IntoIter = Iter<ExprMut<'a, <B as Buffer>::Item, <B as Buffer>::Dim, <B as Buffer>::Layout>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, D: Dim, A: Allocator> IntoIterator for Array<GridBuffer<T, D, A>>

§

type Item = T

The type of the elements being iterated over.
§

type IntoIter = <Vec<T> as IntoIterator>::IntoIter

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T, D: 'a + Dim, L: Layout> IntoIterator for Array<ViewBuffer<'a, T, D, L>>

§

type Item = &'a T

The type of the elements being iterated over.
§

type IntoIter = Iter<Expr<'a, T, D, L>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<'a, T, D: 'a + Dim, L: Layout> IntoIterator for Array<ViewBufferMut<'a, T, D, L>>

§

type Item = &'a mut T

The type of the elements being iterated over.
§

type IntoIter = Iter<ExprMut<'a, T, D, L>>

Which kind of iterator are we turning this into?
source§

fn into_iter(self) -> Self::IntoIter

Creates an iterator from a value. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Mul<I> for &Array<B>
where for<'a> &'a B::Item: Mul<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: I) -> Self::Output

Performs the * operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Mul<I> for Array<GridBuffer<T, D, A>>
where T: Mul<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: I) -> Self

Performs the * operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Mul<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Mul<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the * operator.
source§

fn mul(self, rhs: I) -> Self::Output

Performs the * operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> MulAssign<I> for Array<B>
where B::Item: MulAssign<I::Item>,

source§

fn mul_assign(&mut self, rhs: I)

Performs the *= operation. Read more
source§

impl<T, B: Buffer + ?Sized> Neg for &Array<B>
where for<'a> &'a B::Item: Neg<Output = T>,

§

type Output = Array<GridBuffer<T, <B as Buffer>::Dim, Global>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<T, D: Dim, A: Allocator> Neg for Array<GridBuffer<T, D, A>>
where T: Neg<Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self

Performs the unary - operation. Read more
source§

impl<'a, T, U, D: Dim, L: Layout> Neg for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Neg<Output = U>,

§

type Output = Array<GridBuffer<U, D, Global>>

The resulting type after applying the - operator.
source§

fn neg(self) -> Self::Output

Performs the unary - operation. Read more
source§

impl<T, B: Buffer + ?Sized> Not for &Array<B>
where for<'a> &'a B::Item: Not<Output = T>,

§

type Output = Array<GridBuffer<T, <B as Buffer>::Dim, Global>>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<T, D: Dim, A: Allocator> Not for Array<GridBuffer<T, D, A>>
where T: Not<Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self

Performs the unary ! operation. Read more
source§

impl<'a, T, U, D: Dim, L: Layout> Not for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Not<Output = U>,

§

type Output = Array<GridBuffer<U, D, Global>>

The resulting type after applying the ! operator.
source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
source§

impl<T: Ord, B: Buffer<Item = T, Dim = Const<1>> + ?Sized> Ord for Array<B>

source§

fn cmp(&self, other: &Self) -> Ordering

This method returns an Ordering between self and other. Read more
source§

impl<D: Dim, B: Buffer<Dim = D> + ?Sized, C: Buffer<Dim = D> + ?Sized> PartialEq<Array<C>> for Array<B>
where B::Item: PartialEq<C::Item>,

source§

fn eq(&self, other: &Array<C>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: PartialOrd, B, C> PartialOrd<Array<C>> for Array<B>
where B: Buffer<Item = T, Dim = Const<1>> + ?Sized, C: Buffer<Item = T, Dim = Const<1>> + ?Sized,

source§

fn partial_cmp(&self, other: &Array<C>) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Rem<I> for &Array<B>
where for<'a> &'a B::Item: Rem<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: I) -> Self::Output

Performs the % operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Rem<I> for Array<GridBuffer<T, D, A>>
where T: Rem<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: I) -> Self

Performs the % operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Rem<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Rem<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the % operator.
source§

fn rem(self, rhs: I) -> Self::Output

Performs the % operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> RemAssign<I> for Array<B>
where B::Item: RemAssign<I::Item>,

source§

fn rem_assign(&mut self, rhs: I)

Performs the %= operation. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Shl<I> for &Array<B>
where for<'a> &'a B::Item: Shl<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: I) -> Self::Output

Performs the << operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Shl<I> for Array<GridBuffer<T, D, A>>
where T: Shl<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: I) -> Self

Performs the << operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Shl<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Shl<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the << operator.
source§

fn shl(self, rhs: I) -> Self::Output

Performs the << operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> ShlAssign<I> for Array<B>
where B::Item: ShlAssign<I::Item>,

source§

fn shl_assign(&mut self, rhs: I)

Performs the <<= operation. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Shr<I> for &Array<B>
where for<'a> &'a B::Item: Shr<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: I) -> Self::Output

Performs the >> operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Shr<I> for Array<GridBuffer<T, D, A>>
where T: Shr<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: I) -> Self

Performs the >> operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Shr<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Shr<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the >> operator.
source§

fn shr(self, rhs: I) -> Self::Output

Performs the >> operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> ShrAssign<I> for Array<B>
where B::Item: ShrAssign<I::Item>,

source§

fn shr_assign(&mut self, rhs: I)

Performs the >>= operation. Read more
source§

impl<T, B: Buffer + ?Sized, I: Apply<T>> Sub<I> for &Array<B>
where for<'a> &'a B::Item: Sub<I::Item, Output = T>,

§

type Output = <I as Apply<T>>::ZippedWith<&Array<B>>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: I) -> Self::Output

Performs the - operation. Read more
source§

impl<T, D: Dim, I: IntoExpression, A: Allocator> Sub<I> for Array<GridBuffer<T, D, A>>
where T: Sub<I::Item, Output = T>,

§

type Output = Array<GridBuffer<T, D, A>>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: I) -> Self

Performs the - operation. Read more
source§

impl<'a, T, U, D: Dim, I: Apply<U>, L: Layout> Sub<I> for Array<ViewBuffer<'a, T, D, L>>
where for<'b> &'b T: Sub<I::Item, Output = U>,

§

type Output = <I as Apply<U>>::ZippedWith<Array<ViewBuffer<'a, T, D, L>>>

The resulting type after applying the - operator.
source§

fn sub(self, rhs: I) -> Self::Output

Performs the - operation. Read more
source§

impl<B: BufferMut + ?Sized, I: IntoExpression> SubAssign<I> for Array<B>
where B::Item: SubAssign<I::Item>,

source§

fn sub_assign(&mut self, rhs: I)

Performs the -= operation. Read more
source§

impl<T: Clone, D: Dim> ToOwned for Array<SpanBuffer<T, D, Dense>>

§

type Owned = Array<GridBuffer<T, D, Global>>

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> Self::Owned

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut Self::Owned)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<B: SizedBuffer + Copy> Copy for Array<B>

source§

impl<T: Eq, B: Buffer<Item = T> + ?Sized> Eq for Array<B>
where Self: PartialEq,

Auto Trait Implementations§

§

impl<B: ?Sized> RefUnwindSafe for Array<B>
where B: RefUnwindSafe,

§

impl<B: ?Sized> Send for Array<B>
where B: Send,

§

impl<B: ?Sized> Sync for Array<B>
where B: Sync,

§

impl<B: ?Sized> Unpin for Array<B>
where B: Unpin,

§

impl<B: ?Sized> UnwindSafe for Array<B>
where B: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoCloned<T> for T

source§

fn clone_to(self, target: &mut T)

Moves an existing object or clones from a reference to the target object.
source§

fn into_cloned(self) -> T

Returns an existing object or a new clone from a reference.
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.