#include <Array3D.hxx>
Public Types | |
| typedef Allocator::value_type | value_type |
| typedef Allocator::pointer | pointer |
| typedef Allocator::const_pointer | const_pointer |
| typedef Allocator::reference | reference |
| typedef Allocator::const_reference | const_reference |
Public Member Functions | |
| Array3D () | |
| Default constructor. | |
| Array3D (int i, int j, int k) | |
| Main constructor. | |
| ~Array3D () | |
| Destructor. | |
| int | GetLength1 () const |
| Returns the length in dimension #1. | |
| int | GetLength2 () const |
| Returns the length in dimension #2. | |
| int | GetLength3 () const |
| Returns the length in dimension #3. | |
| int | GetSize () const |
| Returns the number of elements in the 3D array. | |
| int | GetDataSize () const |
| Returns the number of elements stored in memory. | |
| pointer | GetData () const |
| Returns a pointer to the data array. | |
| void | Reallocate (int i, int j, int k) |
| Reallocates memory to resize the 3D array. | |
| reference | operator() (int i, int j, int k) |
| Access operator. | |
| const_reference | operator() (int i, int j, int k) const |
| Access operator. | |
| void | Copy (const Array3D< T, Allocator > &A) |
| Duplicates a 3D array. | |
| void | Zero () |
| Sets all elements to zero. | |
| void | Fill () |
| Fills the array. | |
| template<class T0> | |
| void | Fill (const T0 &x) |
| Fills the 3D array with a given value. | |
| void | FillRand () |
| Fills the 3D array randomly. | |
| void | Print () const |
| Displays the array on the standard output. | |
Protected Attributes | |
| int | length1_ |
| int | length2_ |
| int | length3_ |
| int | length23_ |
| pointer | data_ |
Static Protected Attributes | |
| static Allocator | array3D_allocator_ |
This class implements 3D arrays.
|
|||||||||
|
Default constructor. On exit, the array is an empty 0x0x0 3D array. |
|
||||||||||||||||||||
|
Main constructor. Builds a i x j x k 3D array, but data is not initialized.
|
|
||||||||||
|
Duplicates a 3D array.
|
|
||||||||||||||
|
Fills the 3D array with a given value. On exit, the 3D array is filled with 'x'.
|
|
|||||||||
|
Fills the array. On exit, the 3D array is filled with 1, 2, 3, 4, ... The order of those numbers depends on the storage. |
|
|||||||||
|
Fills the 3D array randomly. On exit, the 3D array is filled with random values. |
|
|||||||||
|
Returns a pointer to the data array. Returns a pointer to data, i.e. the data array 'data_' which stores the values.
|
|
|||||||||
|
Returns the number of elements stored in memory. Returns the number of elements stored in memory by the array, i.e. the product of lengths in the three dimensions.
|
|
|||||||||
|
Returns the length in dimension #1.
|
|
|||||||||
|
Returns the length in dimension #2.
|
|
|||||||||
|
Returns the length in dimension #3.
|
|
|||||||||
|
Returns the number of elements in the 3D array. Returns the number of elements stored by the 3D array, i.e. the product of the lengths in the three dimensions.
|
|
||||||||||||||||||||
|
Access operator. Returns the value of element (i, j, k).
|
|
||||||||||||||||||||
|
Access operator. Returns the value of element (i, j, k).
|
|
|||||||||
|
Displays the array on the standard output. Displays elements on the standard output, in text format. |
|
||||||||||||||||||||
|
Reallocates memory to resize the 3D array. On exit, the array is a i x j x k 3D array.
|
|
|||||||||
|
Sets all elements to zero.
|
1.4.0