|
The blo Library
|
3D array. More...
#include <Array3D.h>
Classes | |
| class | Dim1Proxy |
| Array first dimension proxy. More... | |
Public Member Functions | |
| Array3D ()=default | |
| Default constructor. | |
| Array3D (int size1, int size2, int size3) | |
| Constructs array of specified size. | |
| Array3D (int size1, int size2, int size3, const T &val) | |
| Constructs array of specified size and value. | |
| Array3D (const Array3D &rhs) | |
| Copy constructor. | |
| Array3D (Array3D &&rhs) noexcept | |
| Move constructor. | |
| virtual | ~Array3D () |
| Destructor. | |
| Array3D & | operator= (const Array3D &rhs) |
| Copy assignment operator. | |
| Array3D & | operator= (Array3D &&rhs) noexcept |
| Move assignment operator. | |
| Dim1Proxy | operator[] (int i) |
| Index first dimension of array. | |
| const Dim1Proxy | operator[] (int i) const |
| Index first dimension of array. | |
| bool | empty () const |
| Tests if the array is empty. | |
| void | resize (int size1, int size2, int size3) |
| Resizes array. | |
| void | clear () |
| Resizes array to zero rows and zero columns. | |
| int | size1 () const |
| Size of first dimension of array. | |
| int | size2 () const |
| Size of second dimension of array. | |
| int | size3 () const |
| Size of third dimension of array. | |
| T * | ptrData () |
| Retrieves the pointer to the beginning of the array. | |
| const T * | ptrData () const |
| Retrieves the pointer to the beginning of the array. | |
| int | stride1 () const |
| Stride in bytes through the first dimension of the array. | |
| int | stride2 () const |
| Stride in bytes through the second dimension of the array. | |
| void | swap (Array3D &rhs) |
| Swaps this array with another one. | |
| void | set (const T &val) |
| Sets array elements to a value. | |
Static Public Member Functions | |
| static int | stride3 () |
| Stride in bytes through the third dimension of the array. | |
3D array.
| T | Data type. |
|
default |
Default constructor.
| blo::Array3D< T >::Array3D | ( | int | size1, |
| int | size2, | ||
| int | size3 | ||
| ) |
Constructs array of specified size.
| size1 | Size of first dimension of array. |
| size2 | Size of second dimension of array. |
| size3 | Size of third dimension of array. |
| blo::Array3D< T >::Array3D | ( | int | size1, |
| int | size2, | ||
| int | size3, | ||
| const T & | val | ||
| ) |
Constructs array of specified size and value.
| size1 | Size of first dimension of array. |
| size2 | Size of second dimension of array. |
| size3 | Size of third dimension of array. |
| val | Constant value to assign to each element in the array. |
| blo::Array3D< T >::Array3D | ( | const Array3D< T > & | rhs | ) |
Copy constructor.
|
noexcept |
Move constructor.
|
virtual |
Destructor.
| void blo::Array3D< T >::clear | ( | ) |
Resizes array to zero rows and zero columns.
| bool blo::Array3D< T >::empty | ( | ) | const |
Tests if the array is empty.
|
noexcept |
Move assignment operator.
| Array3D & blo::Array3D< T >::operator= | ( | const Array3D< T > & | rhs | ) |
Copy assignment operator.
| Dim1Proxy blo::Array3D< T >::operator[] | ( | int | i | ) |
Index first dimension of array.
| i | First dimension of the array. |
| const Dim1Proxy blo::Array3D< T >::operator[] | ( | int | i | ) | const |
Index first dimension of array.
| i | First dimension of the array. |
| T * blo::Array3D< T >::ptrData | ( | ) |
Retrieves the pointer to the beginning of the array.
| const T * blo::Array3D< T >::ptrData | ( | ) | const |
Retrieves the pointer to the beginning of the array.
| void blo::Array3D< T >::resize | ( | int | size1, |
| int | size2, | ||
| int | size3 | ||
| ) |
Resizes array.
| size1 | Size of first dimension to resize array to. |
| size2 | Size of second dimension to resize array to. |
| size3 | Size of third dimension to resize array to. |
| void blo::Array3D< T >::set | ( | const T & | val | ) |
Sets array elements to a value.
| val | Constant value to assign to each element in the array. |
| int blo::Array3D< T >::size1 | ( | ) | const |
Size of first dimension of array.
| int blo::Array3D< T >::size2 | ( | ) | const |
Size of second dimension of array.
| int blo::Array3D< T >::size3 | ( | ) | const |
Size of third dimension of array.
| int blo::Array3D< T >::stride1 | ( | ) | const |
Stride in bytes through the first dimension of the array.
| int blo::Array3D< T >::stride2 | ( | ) | const |
Stride in bytes through the second dimension of the array.
|
static |
Stride in bytes through the third dimension of the array.
| void blo::Array3D< T >::swap | ( | Array3D< T > & | rhs | ) |
Swaps this array with another one.