matlab::data::ColumnMajor
C++ class to create iterators and ranges that iterate in column-major order
Since R2022a
Description
Use the ColumnMajor
class to create iterators and ranges that access array
elements in column-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 ColumnMajorIterator<T> begin(Array& arr) template <typename T> static ColumnMajorIterator<T> begin(TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T> begin(Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T> begin(TypedArrayRef<T>& ref) template <typename T> static ColumnMajorIterator<T const> begin(const Array& arr) template <typename T> static ColumnMajorIterator<T const> begin(const TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T const> begin(const Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T const> begin(const TypedArrayRef<T>& ref) template <typename T> static ColumnMajorIterator<T const> cbegin(const TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T const> cbegin(const Array& arr) template <typename T> static ColumnMajorIterator<T const> cbegin(const Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T const> cbegin(const TypedArrayRef<T>& ref)
Create a ColumnMajorIterator
to the beginning of the input array. For
best performance when reading data from an array, use functions that return
ColumnMajorIterator<T const>
.
| Array used to create the iterator. |
| Array used to create the iterator. |
| Reference to the array used to create the iterator. |
| Reference to the array used to create the iterator. |
| 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 ColumnMajorIterator<T> end(Array& arr) template <typename T> static ColumnMajorIterator<T> end(TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T> end(Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T> end(TypedArrayRef<T>& ref) template <typename T> static ColumnMajorIterator<T const> end(const Array& arr) template <typename T> static ColumnMajorIterator<T const> end(const TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T const> end(const Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T const> end(const TypedArrayRef<T>& ref) template <typename T> static ColumnMajorIterator<T const> cend(const TypedArray<T>& arr) template <typename T> static ColumnMajorIterator<T const> cend(const Array& arr) template <typename T> static ColumnMajorIterator<T const> cend(const Reference<Array>& ref) template <typename T> static ColumnMajorIterator<T const> cend(const TypedArrayRef<T>& ref)
Create a ColumnMajorIterator
to the end of the input array.
| Const or non-const array used to create the iterator. |
| Const or non-const array used to create the iterator. |
| Const or non-const reference to the array used to create the iterator. |
| Const or non-const reference to the array used to create the iterator. |
| 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<ColumnMajorIterator<T const>> readOnlyElements(const Array& arr) template <typename T> static Range<ColumnMajorIterator<T const>> readOnlyElements(const TypedArray<T>& arr) template <typename T> static Range<ColumnMajorIterator<T const>> readOnlyElements(const Reference<Array>& ref) template <typename T> static Range<ColumnMajorIterator<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<ColumnMajorIterator<T>> writableElements(Array& arr) template <typename T> static Range<ColumnMajorIterator<T>> writableElements(TypedArray<T>& arr) template <typename T> static Range<ColumnMajorIterator<T>> writableElements(Reference<Array>& ref) template <typename T> static Range<ColumnMajorIterator<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 ColumnMajorIterator<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