boost::multi::subarray
Mutable D‐dimensional view into part or all of an array
Synopsis
Declared in <boost/multi/array_ref.hpp>
template<
typename T,
multi::dimensionality_type D,
typename ElementPtr = T*,
class Layout = layout_t<D, std::pointer_traits<ElementPtr>::difference_type>>
class subarray
: public const_subarray<T, D, ElementPtr, Layout>
Description
Represents a subregion of a larger array without owning the elements. Has reference semantics: cannot be rebound, assignments are deep, and size is immutable. Invalidated if the originating array is destroyed or resized.
Base Classes
Name |
Description |
Read‐only |
Type Aliases
Name |
Description |
Indexable const‐cursor, pointer‐like objects that mutidimensioally indexable (type usually returned by |
|
For |
|
Subarray immutable reference after binding first index, |
|
Indexable cursor, pointer‐like objects that mutidimensioally indexable (type usually returned by |
|
Associated type that this reference decays to (when true copies are needed) |
|
Integer type to store dimensionality information (e.g. 1D, 2D, 3D) |
|
Element type ( |
|
Pointer to immutable element type (usually |
|
|
|
Pointer‐like type that produces an moved element (r‐value) |
|
Pointer to element type (usually |
|
Reference type to an element (usually |
|
|
(deprecated, use |
|
(deprecated) use |
A type to store the extent of an array (the range of valid indices in the leading dimension), returned from |
|
A type that stores the extents of the array or subarray (returned from |
|
Type to store an index in the leading dimension |
|
Type that represents a range of indicies |
|
A tuple type that allows storing |
|
Iterator in the leading dimension that mark elements as movable |
|
For |
|
Subarray reference after binding first index, |
|
A type to hold the size of an array or subarray (size in the leading dimension) (usually signed) |
|
Member Functions
Name |
Description |
|
Constructors |
|
Destructor |
|
Assignment operators |
When evaluated on a tuple object this is equivalent to |
|
Returns a const‐element view of the subarray, preventing modification of elements. |
|
Returns an immutable reference to the back element. |
|
Returns the base const‐pointer of the array (arithmetic base of the layout, generally the first element) |
|
returns an const‐iterator to the beginning |
|
returns an const‐iterator to the end |
|
produces a subarray of higher dimension by chunking in the leading dimension (if |
|
creates a view of the array with element references with const‐removed |
|
materializes an independent, owning |
|
Subarray of lower dimension that represents the main diagonal of a square array |
|
A an array view in which elementes references are r‐values |
|
a view with the elements transformed |
|
returns a random‐access range with all the elements of the array |
|
|
Deprecated, prefer |
Returns the index extensions (structured cartesian product of half‐open ranges) for all dimensions as an |
|
Returns an immutable reference to the front element. |
|
returns the associated allocator |
|
returns a cursor pointing to the top corner element of the array |
|
returns the internal layout information of the array |
|
returns an move‐iterator (moves on dereference) to the beginning in the leading dimension |
|
returns an move‐iterator (moves on dereference) to the ending in the leading dimension |
|
Address‐of operators |
|
Returns a subarray of the same dimension |
|
Materializes an independent, owning |
|
Subscript operators |
|
|
|
yields a subarray of higher dimension by splitting the leading dimension into |
|
serializes data to generic archive (e.g. Boost or Cereal archive) |
|
|
|
A subarray‐view from index |
|
A subarray‐view of the array with skipping |
|
A transpose view , that exchanges the first two indices |
|
Conversion to |
|
Equality operator |
|
Inequality operator |
|
Less‐than operator |
|
Less‐than‐or‐equal operator |
|
Greater‐than operator |
Static Member Functions
Name |
|
Friends
Name |
Description |
|
|
|
|
|
Mutable |
Non-Member Functions
Name |
Description |
Inequality operator |
|
Equality operator |
|
Bitwise negation operator |
Derived Classes
Name |
Description |
A |
|
Template Parameters
Name |
Description |
T |
Element type |
D |
Dimensionality (non‐negative) |
ElementPtr |
Pointer‐like type to the elements (default |
Layout |
type describing strides and extensions |
Created with MrDocs