Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

vbl_array_2d< T > Class Template Reference

#include <vbl_array_2d.h>

List of all members.


Detailed Description

template<class T>
class vbl_array_2d< T >

simple 2D array.

Definition at line 24 of file vbl_array_2d.h.

Public Types

typedef T * iterator
typedef T const * const_iterator

Public Member Functions

 vbl_array_2d ()
 Default constructor.
 vbl_array_2d (int m, int n)
 Construct m-by-n array.
 vbl_array_2d (int m, int n, const T &v)
 Construct and fill an m-by-n array.
 vbl_array_2d (vbl_array_2d< T > const &that)
 Construct from a 2d array.
 ~vbl_array_2d ()
 Destructor.
vbl_array_2d< T > & operator= (vbl_array_2d< T > const &that)
 Assignment.
bool operator== (vbl_array_2d< T > const &that) const
 Comparison.
bool operator!= (vbl_array_2d< T > const &that) const
void fill (T value)
 fill with `value'.
void resize (int m, int n)
 change size.
void clear ()
 make as if default-constructed.
T const & operator() (int i, int j) const
T & operator() (int i, int j)
void put (int i, int j, T const &x)
get (int i, int j) const
T const * operator[] (int i) const
T * operator[] (int i)
int rows () const
 Return number of rows.
int cols () const
 Return number of columns.
int columns () const
 Return number of columns.
int size () const
 Return size = (number of rows) * (number of columns).
T ** get_rows ()
T const *const * get_rows () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const

Private Member Functions

void construct ()
void construct (int m, int n)
void destruct ()

Private Attributes

T ** rows_
int num_rows_
int num_cols_


Member Typedef Documentation

template<class T>
typedef T const* vbl_array_2d< T >::const_iterator
 

Definition at line 124 of file vbl_array_2d.h.

template<class T>
typedef T* vbl_array_2d< T >::iterator
 

Definition at line 120 of file vbl_array_2d.h.


Constructor & Destructor Documentation

template<class T>
vbl_array_2d< T >::vbl_array_2d  )  [inline]
 

Default constructor.

Definition at line 29 of file vbl_array_2d.h.

template<class T>
vbl_array_2d< T >::vbl_array_2d int  m,
int  n
[inline]
 

Construct m-by-n array.

Definition at line 32 of file vbl_array_2d.h.

template<class T>
vbl_array_2d< T >::vbl_array_2d int  m,
int  n,
const T &  v
[inline]
 

Construct and fill an m-by-n array.

Definition at line 35 of file vbl_array_2d.h.

template<class T>
vbl_array_2d< T >::vbl_array_2d vbl_array_2d< T > const &  that  )  [inline]
 

Construct from a 2d array.

Definition at line 38 of file vbl_array_2d.h.

template<class T>
vbl_array_2d< T >::~vbl_array_2d  )  [inline]
 

Destructor.

Definition at line 44 of file vbl_array_2d.h.


Member Function Documentation

template<class T>
const_iterator vbl_array_2d< T >::begin  )  const [inline]
 

Definition at line 125 of file vbl_array_2d.h.

template<class T>
iterator vbl_array_2d< T >::begin  )  [inline]
 

Definition at line 121 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::clear  )  [inline]
 

make as if default-constructed.

Definition at line 87 of file vbl_array_2d.h.

template<class T>
int vbl_array_2d< T >::cols  )  const [inline]
 

Return number of columns.

Definition at line 109 of file vbl_array_2d.h.

template<class T>
int vbl_array_2d< T >::columns  )  const [inline]
 

Return number of columns.

Definition at line 112 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::construct int  m,
int  n
[inline, private]
 

Definition at line 139 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::construct  )  [inline, private]
 

Definition at line 133 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::destruct  )  [inline, private]
 

Definition at line 153 of file vbl_array_2d.h.

template<class T>
const_iterator vbl_array_2d< T >::end  )  const [inline]
 

Definition at line 126 of file vbl_array_2d.h.

template<class T>
iterator vbl_array_2d< T >::end  )  [inline]
 

Definition at line 122 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::fill value  )  [inline]
 

fill with `value'.

Definition at line 72 of file vbl_array_2d.h.

template<class T>
T vbl_array_2d< T >::get int  i,
int  j
const [inline]
 

Definition at line 99 of file vbl_array_2d.h.

template<class T>
T const* const* vbl_array_2d< T >::get_rows  )  const [inline]
 

Definition at line 118 of file vbl_array_2d.h.

template<class T>
T* * vbl_array_2d< T >::get_rows  )  [inline]
 

Definition at line 117 of file vbl_array_2d.h.

template<class T>
bool vbl_array_2d< T >::operator!= vbl_array_2d< T > const &  that  )  const [inline]
 

Definition at line 67 of file vbl_array_2d.h.

template<class T>
T& vbl_array_2d< T >::operator() int  i,
int  j
[inline]
 

Definition at line 96 of file vbl_array_2d.h.

template<class T>
T const& vbl_array_2d< T >::operator() int  i,
int  j
const [inline]
 

Definition at line 95 of file vbl_array_2d.h.

template<class T>
vbl_array_2d<T>& vbl_array_2d< T >::operator= vbl_array_2d< T > const &  that  )  [inline]
 

Assignment.

Definition at line 47 of file vbl_array_2d.h.

template<class T>
bool vbl_array_2d< T >::operator== vbl_array_2d< T > const &  that  )  const [inline]
 

Comparison.

Definition at line 56 of file vbl_array_2d.h.

template<class T>
T* vbl_array_2d< T >::operator[] int  i  )  [inline]
 

Definition at line 102 of file vbl_array_2d.h.

template<class T>
T const* vbl_array_2d< T >::operator[] int  i  )  const [inline]
 

Definition at line 101 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::put int  i,
int  j,
T const &  x
[inline]
 

Definition at line 98 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::resize int  m,
int  n
[inline]
 

change size.

Definition at line 79 of file vbl_array_2d.h.

template<class T>
int vbl_array_2d< T >::rows  )  const [inline]
 

Return number of rows.

Definition at line 106 of file vbl_array_2d.h.

template<class T>
int vbl_array_2d< T >::size  )  const [inline]
 

Return size = (number of rows) * (number of columns).

Definition at line 115 of file vbl_array_2d.h.


Member Data Documentation

template<class T>
int vbl_array_2d< T >::num_cols_ [private]
 

Definition at line 131 of file vbl_array_2d.h.

template<class T>
int vbl_array_2d< T >::num_rows_ [private]
 

Definition at line 130 of file vbl_array_2d.h.

template<class T>
T** vbl_array_2d< T >::rows_ [private]
 

Definition at line 129 of file vbl_array_2d.h.


The documentation for this class was generated from the following file:
Generated on Thu Jan 10 14:39:08 2008 for core/vbl by  doxygen 1.4.4