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 25 of file vbl_array_2d.h.


Public Types

typedef vcl_size_t size_type
typedef T * iterator
typedef T const * const_iterator

Public Member Functions

 vbl_array_2d ()
 Default constructor.
 vbl_array_2d (size_type m, size_type n)
 Construct m-by-n array.
 vbl_array_2d (size_type m, size_type 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 (size_type m, size_type n)
 change size.
void clear ()
 make as if default-constructed.
T const & operator() (size_type i, size_type j) const
T & operator() (size_type i, size_type j)
void put (size_type i, size_type j, T const &x)
get (size_type i, size_type j) const
T const * operator[] (size_type i) const
T * operator[] (size_type i)
size_type rows () const
 Return number of rows.
size_type cols () const
 Return number of columns.
size_type columns () const
 Return number of columns.
size_type 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 (size_type m, size_type n)
void destruct ()

Private Attributes

T ** rows_
size_type num_rows_
size_type num_cols_

Member Typedef Documentation

template<class T>
typedef vcl_size_t vbl_array_2d< T >::size_type

Definition at line 28 of file vbl_array_2d.h.

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

Definition at line 123 of file vbl_array_2d.h.

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

Definition at line 127 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 32 of file vbl_array_2d.h.

template<class T>
vbl_array_2d< T >::vbl_array_2d ( size_type  m,
size_type  n 
) [inline]

Construct m-by-n array.

Definition at line 35 of file vbl_array_2d.h.

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

Construct and fill an m-by-n array.

Definition at line 38 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 41 of file vbl_array_2d.h.

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

Destructor.

Definition at line 47 of file vbl_array_2d.h.


Member Function Documentation

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

Assignment.

Definition at line 50 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 59 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 70 of file vbl_array_2d.h.

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

fill with `value'.

Definition at line 75 of file vbl_array_2d.h.

template<class T>
void vbl_array_2d< T >::resize ( size_type  m,
size_type  n 
) [inline]

change size.

Definition at line 82 of file vbl_array_2d.h.

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

make as if default-constructed.

Definition at line 90 of file vbl_array_2d.h.

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

Definition at line 98 of file vbl_array_2d.h.

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

Definition at line 99 of file vbl_array_2d.h.

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

Definition at line 101 of file vbl_array_2d.h.

template<class T>
T vbl_array_2d< T >::get ( size_type  i,
size_type  j 
) const [inline]

Definition at line 102 of file vbl_array_2d.h.

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

Definition at line 104 of file vbl_array_2d.h.

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

Definition at line 105 of file vbl_array_2d.h.

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

Return number of rows.

Definition at line 109 of file vbl_array_2d.h.

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

Return number of columns.

Definition at line 112 of file vbl_array_2d.h.

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

Return number of columns.

Definition at line 115 of file vbl_array_2d.h.

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

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

Definition at line 118 of file vbl_array_2d.h.

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

Definition at line 120 of file vbl_array_2d.h.

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

Definition at line 121 of file vbl_array_2d.h.

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

Definition at line 124 of file vbl_array_2d.h.

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

Definition at line 125 of file vbl_array_2d.h.

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

Definition at line 128 of file vbl_array_2d.h.

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

Definition at line 129 of file vbl_array_2d.h.

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

Definition at line 136 of file vbl_array_2d.h.

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

Definition at line 142 of file vbl_array_2d.h.

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

Definition at line 156 of file vbl_array_2d.h.


Member Data Documentation

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

Definition at line 132 of file vbl_array_2d.h.

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

Definition at line 133 of file vbl_array_2d.h.

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

Definition at line 134 of file vbl_array_2d.h.


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

Generated on Sun Nov 22 06:17:50 2009 for core/vbl by  doxygen 1.5.5