arr2b< T > Class Template Reference
[Array classes]
#include <arr.h>
List of all members.
Detailed Description
template<typename T>
class arr2b< T >
Two-dimensional array type. An entry is located by double dereferencing, i.e. via an array of pointers. The indices start at zero.
Definition at line 511 of file arr.h.
Constructor & Destructor Documentation
Creates a zero-sized array.
Definition at line 523 of file arr.h.
Creates an array with the dimensions sz1 and sz2.
Definition at line 525 of file arr.h.
Creates the array as a copy of orig.
Definition at line 529 of file arr.h.
Frees the memory associated with the array.
Definition at line 533 of file arr.h.
Member Function Documentation
Returns the first array dimension.
Definition at line 536 of file arr.h.
Returns the second array dimension.
Definition at line 538 of file arr.h.
Returns the total array size, i.e. the product of both dimensions.
Definition at line 540 of file arr.h.
Allocates space for an array with sz1*sz2 elements. The content of the array is undefined on exit.
Definition at line 544 of file arr.h.
template<typename T>
void arr2b< T >::dealloc |
( |
|
) |
[inline] |
Deallocates the space and makes the array zero-sized.
Definition at line 553 of file arr.h.
template<typename T>
void arr2b< T >::fill |
( |
const T & |
val |
) |
[inline] |
Sets all array elements to val.
Definition at line 556 of file arr.h.
Changes the array to be a copy of orig.
Definition at line 560 of file arr.h.
template<typename T>
template<typename T2>
T* arr2b< T >::operator[] |
( |
T2 |
n |
) |
[inline] |
Returns a pointer to the beginning of slice n.
Definition at line 569 of file arr.h.
template<typename T>
template<typename T2>
const T* arr2b< T >::operator[] |
( |
T2 |
n |
) |
const [inline] |
Returns a constant pointer to the beginning of slice n.
Definition at line 571 of file arr.h.
template<typename T>
T** arr2b< T >::p0 |
( |
|
) |
[inline] |
Returns a pointer to the beginning of the pointer array.
Definition at line 574 of file arr.h.
The documentation for this class was generated from the following file: