Struct mdarray::SpanBase

source ·
pub struct SpanBase<T, L: Copy> { /* private fields */ }
Expand description

Multidimensional array span with static rank and element order.

Implementations

Returns a mutable pointer to the array buffer.

Returns a raw pointer to the array buffer.

Returns the array layout.

Returns an array view of the entire array span.

Returns a mutable array view of the entire array span.

Returns an iterator that gives array views over the specified dimension.

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

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

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

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

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

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

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

Clones an array span into the array span.

Panics

Panics if the two spans have different shapes.

Fills the array span with elements by cloning value.

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

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

Panics

Panics if the array layout is not uniformly strided.

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

Panics

Panics if the array layout is not uniformly strided.

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

Safety

The index must be within bounds of the array span.

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.

Copies the specified subarray into a new array.

Panics

Panics if the subarray is out of bounds.

Returns an iterator that gives array views over the inner dimension.

Iterating over the inner dimension maintains the uniform stride property but not unit inner stride, so that the resulting array views have flat or strided format.

Panics

Panics if the rank is not at least 1.

Returns a mutable iterator that gives array views over the inner dimension.

Iterating over the inner dimension maintains the uniform stride property but not unit inner stride, so that the resulting array views have flat or strided format.

Panics

Panics if the rank is not at least 1.

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 an iterator over the array span, which must support linear indexing.

Returns a mutable iterator over the array span, which must support linear indexing.

Returns the number of elements in the array.

Returns an iterator that gives array views over the outer dimension.

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

Panics

Panics if the rank is not at least 1.

Returns a mutable iterator that gives array views over the outer dimension.

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

Panics

Panics if the rank is not at least 1.

Returns a reformatted array view of the array span.

Panics

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

Returns a mutable reformatted array view of the array span.

Panics

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

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.

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.

Returns the shape of the array.

Returns the number of elements in the specified dimension.

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

Panics

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

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

Panics

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

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.

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.

Returns the distance between elements in the specified dimension.

Returns the distance between elements in each dimension.

Copies the array span into a new array.

Copies the array span into a new vector.

Returns an array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

Returns a mutable array view for the specified subarray.

Panics

Panics if the subarray is out of bounds.

Returns a mutable slice of all elements in the array.

Returns a slice of all elements in the array.

Trait Implementations

The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
The resulting type after applying the + operator.
Performs the + operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Performs the += operation. Read more
Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
The resulting type after applying the & operator.
Performs the & operation. Read more
The resulting type after applying the & operator.
Performs the & operation. Read more
The resulting type after applying the & operator.
Performs the & operation. Read more
The resulting type after applying the & operator.
Performs the & operation. Read more
The resulting type after applying the & operator.
Performs the & operation. Read more
The resulting type after applying the & operator.
Performs the & operation. Read more
Performs the &= operation. Read more
Performs the &= operation. Read more
Performs the &= operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
The resulting type after applying the | operator.
Performs the | operation. Read more
Performs the |= operation. Read more
Performs the |= operation. Read more
Performs the |= operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
The resulting type after applying the ^ operator.
Performs the ^ operation. Read more
Performs the ^= operation. Read more
Performs the ^= operation. Read more
Performs the ^= operation. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Formats the value using the given formatter. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
The resulting type after applying the / operator.
Performs the / operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Performs the /= operation. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
The returned type after indexing.
Performs the indexing (container[index]) operation. Read more
Performs the mutable indexing (container[index]) operation. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
The resulting type after applying the * operator.
Performs the * operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
Performs the *= operation. Read more
The resulting type after applying the - operator.
Performs the unary - operation. Read more
The resulting type after applying the ! operator.
Performs the unary ! operation. Read more
This method returns an Ordering between self and other. Read more
Compares and returns the maximum of two values. Read more
Compares and returns the minimum of two values. Read more
Restrict a value to a certain interval. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
The resulting type after applying the % operator.
Performs the % operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
Performs the %= operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
The resulting type after applying the << operator.
Performs the << operation. Read more
Performs the <<= operation. Read more
Performs the <<= operation. Read more
Performs the <<= operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
The resulting type after applying the >> operator.
Performs the >> operation. Read more
Performs the >>= operation. Read more
Performs the >>= operation. Read more
Performs the >>= operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
The resulting type after applying the - operator.
Performs the - operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
Performs the -= operation. Read more
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

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 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.