NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links

arr3< T > Class Template Reference
[Array classes]

#include <arr.h>

List of all members.

Public Member Functions

 arr3 ()
 arr3 (long sz1, long sz2, long sz3)
 arr3 (const arr3 &orig)
 ~arr3 ()
long size1 () const
long size2 () const
long size3 () const
long size () const
void alloc (long sz1, long sz2, long sz3)
void dealloc ()
void fill (const T &val)
arr3operator= (const arr3 &orig)
template<typename T2>
T & operator() (T2 n1, T2 n2, T2 n3)
template<typename T2>
const T & operator() (T2 n1, T2 n2, T2 n3) const
void swap (arr3 &other)


Detailed Description

template<typename T>
class arr3< T >

Three-dimensional array type. The storage ordering is the same as in C. An entry is located by address arithmetic, not by multiple dereferencing. The indices start at zero.

Definition at line 375 of file arr.h.


Constructor & Destructor Documentation

template<typename T>
arr3< T >::arr3 (  )  [inline]

Creates a zero-sized array.

Definition at line 383 of file arr.h.

template<typename T>
arr3< T >::arr3 ( long  sz1,
long  sz2,
long  sz3 
) [inline]

Creates an array with the dimensions sz1, sz2 and sz3.

Definition at line 385 of file arr.h.

template<typename T>
arr3< T >::arr3 ( const arr3< T > &  orig  )  [inline]

Creates the array as a copy of orig.

Definition at line 388 of file arr.h.

template<typename T>
arr3< T >::~arr3 (  )  [inline]

Frees the memory associated with the array.

Definition at line 391 of file arr.h.


Member Function Documentation

template<typename T>
long arr3< T >::size1 (  )  const [inline]

Returns the first array dimension.

Definition at line 394 of file arr.h.

template<typename T>
long arr3< T >::size2 (  )  const [inline]

Returns the second array dimension.

Definition at line 396 of file arr.h.

template<typename T>
long arr3< T >::size3 (  )  const [inline]

Returns the third array dimension.

Definition at line 398 of file arr.h.

template<typename T>
long arr3< T >::size (  )  const [inline]

Returns the total array size, i.e. the product of all dimensions.

Definition at line 400 of file arr.h.

template<typename T>
void arr3< T >::alloc ( long  sz1,
long  sz2,
long  sz3 
) [inline]

Allocates space for an array with sz1*sz2*sz3 elements. The content of the array is undefined on exit.

Definition at line 404 of file arr.h.

template<typename T>
void arr3< T >::dealloc (  )  [inline]

Deallocates the space and makes the array zero-sized.

Definition at line 410 of file arr.h.

template<typename T>
void arr3< T >::fill ( const T &  val  )  [inline]

Sets all array elements to val.

Definition at line 413 of file arr.h.

template<typename T>
arr3& arr3< T >::operator= ( const arr3< T > &  orig  )  [inline]

Changes the array to be a copy of orig.

Definition at line 417 of file arr.h.

template<typename T>
template<typename T2>
T& arr3< T >::operator() ( T2  n1,
T2  n2,
T2  n3 
) [inline]

Returns a reference to the element with the indices n1, n2 and n3.

Definition at line 427 of file arr.h.

template<typename T>
template<typename T2>
const T& arr3< T >::operator() ( T2  n1,
T2  n2,
T2  n3 
) const [inline]

Returns a constant reference to the element with the indices n1, n2 and n3.

Definition at line 431 of file arr.h.

template<typename T>
void arr3< T >::swap ( arr3< T > &  other  )  [inline]

Swaps contents and sizes with other.

Definition at line 435 of file arr.h.


The documentation for this class was generated from the following file:

Generated on Fri Jun 18 16:12:29 2010 for LevelS C++ support library
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650