Base class for multi-sized 2D arrays. More...
#include <arcane/utils/MultiArray2.h>
Public Types | |
| using | ConstReferenceType = typename UniqueArray<DataType>::ConstReferenceType |
| using | ThatClass = MultiArray2<DataType> |
Public Member Functions | |
| MultiArray2 (ConstArrayView< Int32 > sizes) | |
| MultiArray2 (const ThatClass &rhs)=delete | |
| ThatClass & | operator= (const ThatClass &rhs)=delete |
| ArrayView< DataType > | operator[] (Integer i) |
| ConstArrayView< DataType > | operator[] (Integer i) const |
| Int32 | totalNbElement () const |
| Total number of elements. | |
| void | clear () |
| Clears the array elements. | |
| void | fill (const DataType &v) |
| Fills the array elements with the value v. | |
| DataType & | at (Integer i, Integer j) |
| ConstReferenceType | at (Integer i, Integer j) const |
| void | setAt (Integer i, Integer j, ConstReferenceType v) |
| Int32 | dim1Size () const |
| Number of elements following the first dimension. | |
| ConstArrayView< Int32 > | dim2Sizes () const |
| Array of the number of elements following the second dimension. | |
| operator MultiArray2View< DataType > () | |
| Conversion operator to a mutable view. | |
| operator ConstMultiArray2View< DataType > () const | |
| Conversion operator to a constant view. | |
| MultiArray2View< DataType > | view () |
| Mutable view of the array. | |
| ConstMultiArray2View< DataType > | constView () const |
| Constant view of the array. | |
| JaggedSmallSpan< DataType > | span () |
| Mutable view of the array. | |
| JaggedSmallSpan< const DataType > | span () const |
| Constant view of the array. | |
| JaggedSmallSpan< const DataType > | constSpan () const |
| Constant view of the array. | |
| ArrayView< DataType > | viewAsArray () |
| View of the array as a 1D array. | |
| ConstArrayView< DataType > | viewAsArray () const |
| View of the array as a 1D array. | |
| void | resize (ConstArrayView< Int32 > new_sizes) |
| Resizes the array with new sizes new_sizes. | |
Protected Member Functions | |
| MultiArray2 (const MultiArray2< DataType > &rhs, bool do_clone) | |
| Copy constructor. Temporary method to be removed once the copy constructor and copy operator are deleted. | |
| MultiArray2 (ConstMultiArray2View< DataType > aview) | |
| MultiArray2 (const MemoryAllocationOptions &allocation_options) | |
| MultiArray2 (const MemoryAllocationOptions &allocation_options, ConstArrayView< Int32 > sizes) | |
| ConstArrayView< DataType > | _value (Integer i) const |
| void | _resize (ConstArrayView< Int32 > ar) |
| void | _copy (const MultiArray2< DataType > &rhs, bool do_clone) |
| void | _copy (ConstMultiArray2View< DataType > aview) |
Base class for multi-sized 2D arrays.
This class manages 2D arrays where the number of elements in the second dimension is variable. For example:
It is possible to resize (via the resize() method) the array while keeping its values, but for performance reasons, these resizes apply to the entire array (it is not possible to resize only a single element, for example v[5].resize(3)).
Like Array and Array2, instances of this class are not copyable or assignable. To get this functionality, you must use the SharedMultiArray2 class for reference semantics or UniqueMultiArray2 for value semantics.
Definition at line 59 of file MultiArray2.h.
| using Arcane::MultiArray2< DataType >::ConstReferenceType = typename UniqueArray<DataType>::ConstReferenceType |
Definition at line 63 of file MultiArray2.h.
| using Arcane::MultiArray2< DataType >::ThatClass = MultiArray2<DataType> |
Definition at line 64 of file MultiArray2.h.
|
inlineexplicit |
Definition at line 70 of file MultiArray2.h.
|
inlineprotected |
Copy constructor. Temporary method to be removed once the copy constructor and copy operator are deleted.
Definition at line 87 of file MultiArray2.h.
|
inlineexplicitprotected |
Definition at line 93 of file MultiArray2.h.
|
inlineexplicitprotected |
Definition at line 99 of file MultiArray2.h.
|
inlineprotected |
Definition at line 105 of file MultiArray2.h.
|
inlineprotected |
Definition at line 287 of file MultiArray2.h.
|
inlineprotected |
Definition at line 293 of file MultiArray2.h.
|
inlineprotected |
Definition at line 233 of file MultiArray2.h.
|
inlineprotected |
Definition at line 226 of file MultiArray2.h.
|
inline |
Definition at line 139 of file MultiArray2.h.
|
inline |
Definition at line 143 of file MultiArray2.h.
|
inline |
Clears the array elements.
Definition at line 128 of file MultiArray2.h.
Referenced by Arcane::MultiArray2< Pointer >::resize().
|
inline |
Constant view of the array.
Definition at line 197 of file MultiArray2.h.
|
inline |
Constant view of the array.
Definition at line 179 of file MultiArray2.h.
Referenced by Arcane::SharedMultiArray2< DataType >::clone(), Arcane::UniqueMultiArray2< DataType >::clone(), and Arcane::MultiArray2< bool >::operator ConstMultiArray2View< bool >().
|
inline |
Number of elements following the first dimension.
Definition at line 155 of file MultiArray2.h.
|
inline |
Array of the number of elements following the second dimension.
Definition at line 158 of file MultiArray2.h.
|
inline |
Fills the array elements with the value v.
Definition at line 135 of file MultiArray2.h.
|
inline |
Conversion operator to a constant view.
Definition at line 167 of file MultiArray2.h.
|
inline |
Conversion operator to a mutable view.
Definition at line 161 of file MultiArray2.h.
|
inline |
Definition at line 113 of file MultiArray2.h.
|
inline |
Definition at line 117 of file MultiArray2.h.
|
inline |
Resizes the array with new sizes new_sizes.
Definition at line 215 of file MultiArray2.h.
|
inline |
Definition at line 147 of file MultiArray2.h.
|
inline |
Mutable view of the array.
Definition at line 185 of file MultiArray2.h.
|
inline |
Constant view of the array.
Definition at line 191 of file MultiArray2.h.
|
inline |
Total number of elements.
Definition at line 125 of file MultiArray2.h.
|
inline |
Mutable view of the array.
Definition at line 173 of file MultiArray2.h.
Referenced by Arcane::MultiArray2< bool >::operator MultiArray2View< bool >().
|
inline |
View of the array as a 1D array.
Definition at line 203 of file MultiArray2.h.
|
inline |
View of the array as a 1D array.
Definition at line 209 of file MultiArray2.h.