matlab::data::RowMajor
C++ class to create iterators and ranges that iterate in row-major order
Since R2022a
Description
Use the RowMajor
class to create iterators and ranges that access array
elements in row-major order. To determine the memory layout of an array, call getMemoryLayout
.
Class Details
Namespace: | matlab::data |
Include: |
|
Iterators
Begin Iterators
template <typename T> static RowMajorIterator<T> begin(Array& arr) template <typename T> static RowMajorIterator<T> begin(TypedArray<T>& arr) template <typename T> static RowMajorIterator<T> begin(Reference<Array>& ref) template <typename T> static RowMajorIterator<T> begin(TypedArrayRef<T>& ref) template <typename T> static RowMajorIterator<T const> begin(const Array& arr) template <typename T> static RowMajorIterator<T const> begin(const TypedArray<T>& arr) template <typename T> static RowMajorIterator<T const> begin(const Reference<Array>& ref) template <typename T> static RowMajorIterator<T const> begin(const TypedArrayRef<T>& ref) template <typename T> static RowMajorIterator<T const> cbegin(const TypedArray<T>& arr) template <typename T> static RowMajorIterator<T const> cbegin(const Array& arr) template <typename T> static RowMajorIterator<T const> cbegin(const Reference<Array>& ref) template <typename T> static RowMajorIterator<T const> cbegin(const TypedArrayRef<T>& ref)
Create a RowMajorIterator
to the beginning of the input array. For best
performance when reading data from an array, use functions that return
RowMajorIterator<T const>
.
| Array used to create the iterator, specified as const or non-const. |
| Array used to create the iterator, specified as const or non-const. |
| Reference to the array used to create the iterator, specified as const or non-const. |
| Reference to the array used to create the iterator, specified as const or non-const. |
| Non-const iterator to the beginning of the array. |
| Const iterator to the beginning of the array. |
| Element of |
End Iterators
template <typename T> static RowMajorIterator<T> end(Array& arr) template <typename T> static RowMajorIterator<T> end(TypedArray<T>& arr) template <typename T> static RowMajorIterator<T> end(Reference<Array>& ref) template <typename T> static RowMajorIterator<T> end(TypedArrayRef<T>& ref) template <typename T> static RowMajorIterator<T const> end(const Array& arr) template <typename T> static RowMajorIterator<T const> end(const TypedArray<T>& arr) template <typename T> static RowMajorIterator<T const> end(const Reference<Array>& ref) template <typename T> static RowMajorIterator<T const> end(const TypedArrayRef<T>& ref) template <typename T> static RowMajorIterator<T const> cend(const TypedArray<T>& arr) template <typename T> static RowMajorIterator<T const> cend(const Array& arr) template <typename T> static RowMajorIterator<T const> cend(const Reference<Array>& ref) template <typename T> static RowMajorIterator<T const> cend(const TypedArrayRef<T>& ref)
Create a RowMajorIterator
to the end of the input array.
| Array used to create the iterator, specified as const or non-const. |
| Array used to create the iterator. |
| Reference to the array used to create the iterator, specified as const or non-const. |
| Reference to the array used to create the iterator, specified as const or non-const. |
| Non-const iterator to the end of the array. |
| Const iterator to the end of the array. |
| Element of |
Member Functions
readOnlyElements
template <typename T> static Range<RowMajorIterator<T const>> readOnlyElements(const Array& arr) template <typename T> static Range<RowMajorIterator<T const>> readOnlyElements(const TypedArray<T>& arr) template <typename T> static Range<RowMajorIterator<T const>> readOnlyElements(const Reference<Array>& ref) template <typename T> static Range<RowMajorIterator<T const>> readOnlyElements(const TypedArrayRef<T>& ref)
Create a Range
containing const iterators. Use for best performance
when reading data from an array.
| Input array used to create the iterators. |
| Input array used to create the iterators. |
| Reference to the input array used to create the iterators. |
| Reference to the input array used to create the iterators. |
|
|
| Element of |
writableElements
template <typename T> static Range<RowMajorIterator<T>> writableElements(Array& arr) template <typename T> static Range<RowMajorIterator<T>> writableElements(TypedArray<T>& arr) template <typename T> static Range<RowMajorIterator<T>> writableElements(Reference<Array>& ref) template <typename T> static Range<RowMajorIterator<T>> writableElements(TypedArrayRef<T>& ref)
Create a Range
containing non-const iterators. For best performance
when reading data from an array, use readOnlyElements
, which returns RowMajorIterator<T
const>
.
| Array used to create the iterators. |
| Array used to create the iterators. |
| Reference to array used to create the iterators. |
| Reference to array used to create the iterators. |
|
|
| Element of |
Version History
Introduced in R2022a