vbl_array_3d< T > Class Template Reference

#include <vbl_array_3d.h>

List of all members.


Detailed Description

template<class T>
class vbl_array_3d< T >

Templated 3-dimensional array.

Definition at line 38 of file vbl_array_3d.h.


Public Types

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

Public Member Functions

 vbl_array_3d ()
 vbl_array_3d (size_type n1, size_type n2, size_type n3)
 vbl_array_3d (size_type n1, size_type n2, size_type n3, T const *init_values)
 vbl_array_3d (size_type n1, size_type n2, size_type n3, T const &fill_value)
 vbl_array_3d (vbl_array_3d< T > const &that)
 ~vbl_array_3d ()
vbl_array_3d< T > & operator= (vbl_array_3d< T > const &that)
bool operator== (vbl_array_3d< T > const &that) const
 Comparison.
T & operator() (unsigned i1, unsigned i2, unsigned i3)
T const & operator() (unsigned i1, unsigned i2, unsigned i3) const
T *const * operator[] (unsigned i1)
T const *const * operator[] (unsigned i1) const
size_type get_row1_count () const
size_type get_row2_count () const
size_type get_row3_count () const
unsigned size () const
iterator begin ()
iterator end ()
const_iterator begin () const
const_iterator end () const
T * data_block ()
T const * data_block () const
void resize (size_type n1, size_type n2, size_type n3)
void set (T const *array)
 Fill from static array of Ts.
void get (T *array) const
 Get into array.
void fill (T const &value)
 Fill with constant.

Protected Member Functions

void construct (size_type, size_type, size_type)
 Constructor utility.
void destruct ()

Private Attributes

T *** element_
size_type row1_count_
size_type row2_count_
size_type row3_count_

Member Typedef Documentation

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

Definition at line 41 of file vbl_array_3d.h.

template<class T>
typedef T vbl_array_3d< T >::element_type

Definition at line 43 of file vbl_array_3d.h.

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

Definition at line 44 of file vbl_array_3d.h.

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

Definition at line 45 of file vbl_array_3d.h.


Constructor & Destructor Documentation

template<class T>
vbl_array_3d< T >::vbl_array_3d (  )  [inline]

Definition at line 47 of file vbl_array_3d.h.

template<class T>
vbl_array_3d< T >::vbl_array_3d ( size_type  n1,
size_type  n2,
size_type  n3 
) [inline]

Definition at line 50 of file vbl_array_3d.h.

template<class T>
vbl_array_3d< T >::vbl_array_3d ( size_type  n1,
size_type  n2,
size_type  n3,
T const *  init_values 
) [inline]

Definition at line 52 of file vbl_array_3d.h.

template<class T>
vbl_array_3d< T >::vbl_array_3d ( size_type  n1,
size_type  n2,
size_type  n3,
T const &  fill_value 
) [inline]

Definition at line 57 of file vbl_array_3d.h.

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

Definition at line 62 of file vbl_array_3d.h.

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

Definition at line 71 of file vbl_array_3d.h.


Member Function Documentation

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

Definition at line 72 of file vbl_array_3d.h.

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

Comparison.

Definition at line 79 of file vbl_array_3d.h.

template<class T>
T& vbl_array_3d< T >::operator() ( unsigned  i1,
unsigned  i2,
unsigned  i3 
) [inline]

Definition at line 97 of file vbl_array_3d.h.

template<class T>
T const& vbl_array_3d< T >::operator() ( unsigned  i1,
unsigned  i2,
unsigned  i3 
) const [inline]

Definition at line 103 of file vbl_array_3d.h.

template<class T>
T* const* vbl_array_3d< T >::operator[] ( unsigned  i1  )  [inline]

Definition at line 109 of file vbl_array_3d.h.

template<class T>
T const* const* vbl_array_3d< T >::operator[] ( unsigned  i1  )  const [inline]

Definition at line 110 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::get_row1_count (  )  const [inline]

Definition at line 113 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::get_row2_count (  )  const [inline]

Definition at line 114 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::get_row3_count (  )  const [inline]

Definition at line 115 of file vbl_array_3d.h.

template<class T>
unsigned vbl_array_3d< T >::size (  )  const [inline]

Definition at line 118 of file vbl_array_3d.h.

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

Definition at line 123 of file vbl_array_3d.h.

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

Definition at line 124 of file vbl_array_3d.h.

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

Definition at line 125 of file vbl_array_3d.h.

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

Definition at line 126 of file vbl_array_3d.h.

template<class T>
T* vbl_array_3d< T >::data_block (  )  [inline]

Definition at line 129 of file vbl_array_3d.h.

template<class T>
T const* vbl_array_3d< T >::data_block (  )  const [inline]

Definition at line 130 of file vbl_array_3d.h.

template<class T>
void vbl_array_3d< T >::resize ( size_type  n1,
size_type  n2,
size_type  n3 
) [inline]

Definition at line 73 of file vbl_array_3d.txx.

template<class T>
void vbl_array_3d< T >::set ( T const *  p  )  [inline]

Fill from static array of Ts.

The final index fills fastest, so if we consider the tensor as a set of matrices (M[i])[j][k] then the matrices are filled in the usual C order.

Definition at line 85 of file vbl_array_3d.txx.

template<class T>
void vbl_array_3d< T >::get ( T *  array  )  const [inline]

Get into array.

Definition at line 95 of file vbl_array_3d.txx.

template<class T>
void vbl_array_3d< T >::fill ( T const &  value  )  [inline]

Fill with constant.

Definition at line 105 of file vbl_array_3d.txx.

template<class T>
void vbl_array_3d< T >::construct ( size_type  n1,
size_type  n2,
size_type  n3 
) [inline, protected]

Constructor utility.

This allocates a 3D array which can be referenced using the form myarray[a][b][c]. Useful in C although maybe superfluous here as access is via a get function anyway.

Definition at line 21 of file vbl_array_3d.txx.

template<class T>
void vbl_array_3d< T >::destruct (  )  [inline, protected]

Definition at line 58 of file vbl_array_3d.txx.


Member Data Documentation

template<class T>
T*** vbl_array_3d< T >::element_ [private]

Definition at line 142 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::row1_count_ [private]

Definition at line 143 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::row2_count_ [private]

Definition at line 144 of file vbl_array_3d.h.

template<class T>
size_type vbl_array_3d< T >::row3_count_ [private]

Definition at line 145 of file vbl_array_3d.h.


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

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