boost::multi::unique_array

Synopsis

Declared in <boost/multi/array.hpp>

template<
    typename T,
    boost::multi::dimensionality_type D,
    class Alloc>
class unique_array
    : public dynamic_array<T, D, Alloc>

Base Classes

Name

Description

dynamic_array<T, D, Alloc>

A D‐dimensional array whose size is bound at construction and never changes.

Type Aliases

Name

Description

allocator_type

Allocator type (returned by get_allocator())

const_cursor

Indexable const‐cursor, pointer‐like objects that mutidimensioally indexable (type usually returned by .home() const)

const_iterator

Random‐access iterator in the leading dimension, in general they dereference to an immutable subarrays of lower dimension (multi::const_subarray<...>) or, for D == 1, to an element immutable reference (T const&)

const_pointer

For D == 1 it the pointer type to the elements (as immutables), otherwise it is void

const_reference

Subarray immutable reference after binding first index, multi::const_subarray<T, D ‐ 1, P> or, for D == 1, std::pointer_traits<const_pointer>::reference (usually T const&)

cursor

Indexable cursor, pointer‐like objects that mutidimensioally indexable (type usually returned by .home())

decay_type

Associalted array value type (generally itself, multi::array<element, dimensionality, allocator_type>)

dimensionality_type

Integer type to store dimensionality information (e.g. 1D, 2D, 3D)

element

Element type (T)

element_const_ptr

The pointer type to a constant element (std::allocator_traits<allocator_type>::const_pointer, usually T const*)

element_cref

const‐qualified reference type to an element (usually T const&)

element_move_ptr

Pointer‐like type that produces an moved element (r‐value)

element_ptr

Pointer to element type (usually T*)

element_ref

Reference type to an element (usually T&)

element_type [deprecated]

(deprecated, use element)

extension_type [deprecated]

(deprecated) use extent_type

extent_type

A type to store the extent of an array (the range of valid indices in the leading dimension), returned from .extent().

extents_type

A type that stores the extents of the array or subarray (returned from .extents() and used for array constructors)

index

Type to store an index in the leading dimension

index_range

Type that represents a range of indicies

indices_type

A tuple type that allows storing D indices to locate an element in the array

iterator

Random‐access iterator in the leading dimension, in general they dereference to a subarray of lower dimension (multi::subarray<...>) or, for D == 1 to an element reference (T&)

layout_type

Layout type (generally a strided layout multi::layout_t<D>)

move_iterator

Iterator in the leading dimension that mark elements as movable

pointer

For D == 1 it the pointer type to the elements, otherwise it is void

reference

Subarray reference after binding first index, multi::subarray<T, D ‐ 1, P> or, for D == 1, std::pointer_traits<pointer>::reference (usually T&)

size_type

A type to hold the size of an array or subarray (size in the leading dimension) (usually signed)

value_type

The value type associated after binding the first index (generally multi::array<element, D ‐ 1>)

Member Functions

Name

Description

unique_array [constructor]

Constructors

~unique_array [destructor]

Destructor

operator=

Copy assignment from other array of a related typed

apply

When evaluated on a tuple object this is equivalent to .operator()(get<0>(tup), get<1>(tup), ...). (The argument type typical has tuple_size<Tuple> == D)

as_const

Returns a const‐element view of the subarray, preventing modification of elements.

back

Returns an immutable reference to the back element.

base

base overloads

begin

returns an iterator to the beginning

cbase

Returns the base const‐pointer of the array (arithmetic base of the layout, generally the first element)

cbegin

returns an const‐iterator to the beginning

cend

returns an const‐iterator to the end

chunked

produces a subarray of higher dimension by chunking in the leading dimension (if count doesn't divide size, so elements are are left out at the end)

const_array_cast

creates a view of the array with element references with const‐removed

data

for D == 1 only, gives a pointer to a memory range of .size(), for compatibility with std::vector and std::span.

data_elements

data_elements overloads

decay

materializes an independent, owning array copy of this view with the associated array‐value type (use unary prefix + as a shortcut)

diagonal

Subarray of lower dimension that represents the main diagonal of a square array

dropped

Gives a subarray dropping the first n indices in the leading dimension

element_moved

A an array view in which elementes references are r‐values

element_transformed

a view with the elements transformed

elements

returns a random‐access range with all the elements of the array

end

returns an iterator to the end

extensions [deprecated]

Deprecated, prefer extents().

extents

Returns the index extensions (structured cartesian product of half‐open ranges) for all dimensions as an extents_type (extents_t<D>), a tuple of D index_extension values each encoding [first, last)]. The result can be passed directly to array constructors or compared for shape equality. Prefer this over the deprecated extensions().

flatted

flattened

front

Returns an immutable reference to the front element.

get_allocator

returns the allocator that is used to acquire/release memory and to construct/destroy the elements in that memory

home

returns a cursor pointing to the top corner element of the array

is_flattable

layout

returns the internal layout information of the array

max_size

returns the maximum number of elements that the vector can hold.

mbegin

returns an move‐iterator (moves on dereference) to the beginning in the leading dimension

member_cast

mend

returns an move‐iterator (moves on dereference) to the ending in the leading dimension

move

mutable_base

operator delete

Delete operator

operator new

New operators

operator&

Address‐of operators

operator()

Returns a subarray of the same dimension

operator+

Materializes an independent, owning array copy of this view with the associated array‐value type

operator[]

Subscript operators

origin [deprecated]

partitioned

yields a subarray of higher dimension by splitting the leading dimension into n equal‐sized partitions (n must divide size())

range

reindexed

reinterpret_array_cast

reversed

rotated

serialize

serialize overloads

shape [deprecated]

sliced

A subarray‐view from index first to index last (not inclusive) skipping step in the leading dimension

static_array_cast

stenciled

strided

A subarray‐view of the array with skipping step in the leading dimension

strides

swap

taked

tiled

to

transposed

A transpose view , that exchanges the first two indices

unrotated

operator Range

Conversion to Range

operator &

Conversion operators

operator To const&

Conversion to To

operator std::span<U>

Conversion to span

operator std::span<U const>

Conversion to span

operator==

Equality operator

operator!=

Inequality operator

operator<

Less‐than operator

operator<=

Less‐than‐or‐equal operator

operator>

Greater‐than operator

Static Member Functions

Name

from_extensions

num_dimensions [deprecated]

Protected Type Aliases

Name

Description

alloc_traits

allocator_type

array_alloc

derived

ref_

Associated array reference type, also its base class (generally multi::array_ref<element, dimensionality, allocator_type>)

Protected Data Members

Name

base_

Non-Member Functions

Name

Description

operator!=

Inequality operator

operator!=

Inequality operator

operator==

Equality operator

operator==

Equality operator

operator~

Bitwise negation operator

Derived Classes

Name

Description

array

A multidimensional array value

Created with MrDocs