Struct mdarray::Layout

source ·
pub struct Layout<D: Dim, F: Format> { /* private fields */ }
Expand description

Array layout, including rank, element order and storage format.

Implementations

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

Returns true if the array contains no elements.

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

Returns the number of elements in the array.

Returns the shape of the array.

Returns the number of elements in the specified dimension.

Panics

Panics if the dimension is out of bounds.

Returns the distance between elements in the specified dimension.

Panics

Panics if the dimension is out of bounds.

Returns the distance between elements in each dimension.

Creates a new, dense array layout with the specified shape.

Creates a new, flat array layout with the specified shape and inner stride.

Creates a new, general array layout with the specified shape and outer strides.

Creates a new, strided array layout with the specified shape and strides.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.
Array element or subslice type.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.