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 291 of file arr.h.
Constructor & Destructor Documentation
Creates a zero-sized array.
Definition at line 312 of file arr.h.
Creates an array with the dimensions sz1 and sz2.
Definition at line 314 of file arr.h.
Creates the array as a copy of orig.
Definition at line 318 of file arr.h.
Frees the memory associated with the array.
Definition at line 322 of file arr.h.
Member Function Documentation
template<typename T>
long arr2b< T >::size1 |
( |
|
) |
const [inline] |
Returns the first array dimension.
Definition at line 325 of file arr.h.
template<typename T>
long arr2b< T >::size2 |
( |
|
) |
const [inline] |
Returns the second array dimension.
Definition at line 327 of file arr.h.
template<typename T>
long arr2b< T >::size |
( |
|
) |
const [inline] |
Returns the total array size, i.e. the product of both dimensions.
Definition at line 329 of file arr.h.
template<typename T>
void arr2b< T >::alloc |
( |
long |
sz1, |
|
|
long |
sz2 | |
|
) |
| | [inline] |
Allocates space for an array with sz1*sz2 elements. The content of the array is undefined on exit.
Definition at line 333 of file arr.h.
template<typename T>
void arr2b< T >::dealloc |
( |
|
) |
[inline] |
Deallocates the space and makes the array zero-sized.
Definition at line 342 of file arr.h.
template<typename T>
void arr2b< T >::fill |
( |
const T & |
val |
) |
[inline] |
Sets all array elements to val.
Definition at line 345 of file arr.h.
Changes the array to be a copy of orig.
Definition at line 349 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 363 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 365 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 368 of file arr.h.
The documentation for this class was generated from the following file: