|
| | arraynd () |
| | Constructs a 1D arraynd object of length zero. More...
|
| |
| | arraynd (const std::array< int64, 1 > &dims, const T &value) |
| | Constructs a 1D arraynd object with the length specified in dims[0] and all elements initialized to value. More...
|
| |
| | arraynd (const std::array< int64, 1 > &dims, const std::vector< T > &data) |
| | Constructs a 1D arraynd object with the length specified in dims[0] and elements initialized with the supplied data. More...
|
| |
| | arraynd (const std::array< int64, 1 > &dims, std::function< T(const std::array< int64, 1 > &indices)> func) |
| | Constructs a 1D arraynd object with the length specified in dims[0] and elements initialized using the function object func. More...
|
| |
| | arraynd (const arraynd< T, 1 > &)=default |
| | Copy constructor (if rhs.is_view(), data is shared; otherwise data is copied) More...
|
| |
| arraynd< T, 1 > & | operator= (const arraynd< T, 1 > &)=default |
| | Copy assignment (if rhs.is_view(), data is shared; otherwise data is copied) More...
|
| |
| | arraynd (arraynd< T, 1 > &&)=default |
| | Move constructor (data is shared) More...
|
| |
| arraynd< T, 1 > & | operator= (arraynd< T, 1 > &&)=default |
| | Move assignment (data is shared) More...
|
| |
| | ~arraynd ()=default |
| | Destructor. More...
|
| |
| const T & | operator[] (int64 index) const |
| | Create a const reference to the element at the specified index. More...
|
| |
| T & | operator[] (int64 index) |
| | Create a reference to the element at the specified index. More...
|
| |
| const arraynd< T, 1 > | operator[] (range r) const |
| | Create a const slice with the dimension filtered by referencing elements in the specified range r (data is shared). More...
|
| |
| arraynd< T, 1 > | operator[] (range r) |
| | Create a slice with the dimension filtered by referencing elements in the specified range r (data is shared). More...
|
| |
| const arraynd< T, 1 > | view () const |
| | Create a const view of the 1D multidimensional array (data is shared). More...
|
| |
| arraynd< T, 1 > | view () |
| | Create a view of the 1D multidimensional array (data is shared). More...
|
| |
| arraynd< T, 1 > | copy () const |
| | Create a deep copy of the 1D multidimensional array (data is copied). More...
|
| |
| const arraynd< T, 2 > | view_subdivided_axis (int64 idim, const std::array< int64, 2 > &dims) const |
| | Create a const view with the single dimension split into two dimensions with lengths given by dims (data is shared). More...
|
| |
| arraynd< T, 2 > | view_subdivided_axis (int64 idim, const std::array< int64, 2 > &dims) |
| | Create a view with the single dimension split into two dimensions with lengths given by dims (data is shared). More...
|
| |
| arraynd< T, 2 > | copy_subdivided_axis (int64 idim, const std::array< int64, 2 > &dims) const |
| | Create a deep copy with the single dimension split into two dimensions with lengths given by dims (data is copied). More...
|
| |
| | ~arraynd_base ()=default |
| | Destructor. More...
|
| |
| std::array< int64, ndims > | dims () const |
| | Returns the lengths of each dimension. More...
|
| |
| std::array< int64, ndims > | strides () const |
| | Returns the number of element-size steps in memory between successive elements for each dimension. More...
|
| |
| bool | empty () const |
| | Returns true if there is at least one element. More...
|
| |
| int64 | size () const |
| | Returns the total number of elements. More...
|
| |
| int64 | offset () const |
| | Returns the number of element-size steps in memory before the first element. More...
|
| |
| const T * | data () const |
| | Returns a pointer to the element data (const). More...
|
| |
| T * | data () |
| | Returns a pointer to the element data. More...
|
| |
| bool | is_contiguous () const |
| | Returns true if a row-major traversal of the multidimensional array accesses each element of data in sequence. More...
|
| |
| bool | is_view () const |
| | Returns true if this multidimensional array is a view of another, meaning that data is shared. More...
|
| |
| bool | is_readonly () const |
| | Returns true if the data is readonly, in which case attempts to modify it raise a std::logic_error. More...
|
| |
| const T & | operator() (const std::array< int64, ndims > &indices) const |
| | Returns a reference to an element (const). More...
|
| |
| T & | operator() (const std::array< int64, ndims > &indices) |
| | Returns a reference to an element. More...
|
| |
| const T & | operator() (const arraynd_base< int64, 1 > &indices) const |
| | Returns a reference to an element (const). More...
|
| |
| T & | operator() (const arraynd_base< int64, 1 > &indices) |
| | Returns a reference to an element. More...
|
| |
| const T & | operator() (Indices... indices) const |
| | Returns a reference to an element (const). More...
|
| |
| T & | operator() (Indices... indices) |
| | Returns a reference to an element. More...
|
| |
| void | fill (const T &value) |
| | Replaces every element with value. More...
|
| |
| void | assign (const arraynd_base< T, ndims > &rhs) |
| | Replaces every element with the corresponding value in rhs. More...
|
| |
| void | assign_from_function (std::function< T(const std::array< int64, ndims > &indices)> func) |
| | Replaces every element with the result of func evaluated at the cooresponding indices. More...
|
| |
| bool | traverse (std::function< bool(const std::array< int64, ndims > &indices, const T &value)> func) const |
| | Traverses the multidimensional array in row-major order, calling func at every element. More...
|
| |
|
| | arraynd_base () |
| |
| | arraynd_base (const std::array< int64, ndims > &dims, const T &value) |
| |
| | arraynd_base (const std::array< int64, ndims > &dims, const std::vector< T > &data) |
| |
| | arraynd_base (const std::array< int64, ndims > &dims, std::function< T(const std::array< int64, ndims > &indices)> func) |
| |
| | arraynd_base (const arraynd_base< T, ndims+1 > &rhs, int64 index, bool is_readonly) |
| |
| | arraynd_base (const arraynd_base< T, ndims > &rhs, range r, bool is_readonly) |
| |
| | arraynd_base (const arraynd_base< T, ndims > &rhs, bool is_view, bool is_readonly) |
| |
| | arraynd_base (const arraynd_base< T, ndims > &rhs) |
| |
| | arraynd_base (arraynd_base< T, ndims > &&)=default |
| |
| arraynd_base< T, ndims > & | operator= (const arraynd_base< T, ndims > &rhs) |
| |
| arraynd_base< T, ndims > & | operator= (arraynd_base< T, ndims > &&)=default |
| |
| static void | transpose (arraynd_base< T, ndims > &arr) |
| |
| static void | swap_axes (arraynd_base< T, ndims > &arr, int64 idim0, int64 idim1) |
| |
| static void | subdivide_axis (const arraynd_base< T, ndims > &arr0, arraynd_base< T, ndims+1 > &arr, int64 idim, const std::array< int64, 2 > &dims) |
| |
| static void | absorb_axis (const arraynd_base< T, ndims > &arr0, arraynd_base< T, ndims-1 > &arr, int64 idim) |
| |
template<typename T>
class sydevs::arraynd< T, 1 >
A one-dimensional (1D) specialization of the arraynd multidimensional array template.