Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

Array2D< S > Class Template Reference

#include <Array.h>

List of all members.


Detailed Description

template<typename S>
class Array2D< S >

Lightweight rectangular array in dimension 2.

Parameters:
S type of array elements.

Definition at line 300 of file Array.h.

Public Member Functions

int getIndexBase (int j) const
int getSize (int j) const
 Array2D (int n_1, int n_2, int b_1=0, int b_2=0)
 ~Array2D ()
const S & operator() (int i, int j) const
S & operator() (int i, int j)
S * operator[] (int i)
std::ostream & printSelf (std::ostream &os) const

Protected Attributes

int b1
int b2
int n1
int n2
S ** dptr


Constructor & Destructor Documentation

template<typename S>
Array2D< S >::Array2D int    n_1,
int    n_2,
int    b_1 = 0,
int    b_2 = 0
[inline]
 

Parameters:
n_1 number of array elements in dimension 1.
b_1 index base in dimension 1.

Definition at line 345 of file Array.h.

template<typename S>
Array2D< S >::~Array2D   [inline]
 

Definition at line 358 of file Array.h.


Member Function Documentation

template<typename S>
int Array2D< S >::getIndexBase int    j const [inline]
 

Index base in dimension j.

Definition at line 320 of file Array.h.

template<typename S>
int Array2D< S >::getSize int    j const [inline]
 

Number of array elements in dimension j.

Definition at line 330 of file Array.h.

template<typename S>
const S& Array2D< S >::operator() int    i,
int    j
const [inline]
 

Subscripting with indices based on the index bases.

Definition at line 365 of file Array.h.

template<typename S>
S& Array2D< S >::operator() int    i,
int    j
[inline]
 

Subscripting with indices based on the index bases.

Definition at line 375 of file Array.h.

template<typename S>
S* Array2D< S >::operator[] int    i [inline]
 

Pointer to row i. This allows subscripting as X[i][j] with absolute (zero based) indices i,j.

Definition at line 387 of file Array.h.

template<typename S>
std::ostream& Array2D< S >::printSelf std::ostream &    os const [inline]
 

Definition at line 396 of file Array.h.


Member Data Documentation

template<typename S>
int Array2D< S >::b1 [protected]
 

Index bases in dimension 1,2,3

Definition at line 305 of file Array.h.

template<typename S>
int Array2D< S >::b2 [protected]
 

Index bases in dimension 1,2,3

Definition at line 305 of file Array.h.

template<typename S>
int Array2D< S >::n1 [protected]
 

Number of elements in dimension 1,2,3.

Definition at line 307 of file Array.h.

template<typename S>
int Array2D< S >::n2 [protected]
 

Number of elements in dimension 1,2,3.

Definition at line 307 of file Array.h.

template<typename S>
S** Array2D< S >::dptr [protected]
 

Data array.

Definition at line 310 of file Array.h.


The documentation for this class was generated from the following file:
Generated on Mon Sep 22 02:16:32 2003 for Libor-Library by doxygen1.3-rc3