Public Types | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
vbl_array_3d< T > Class Template Reference

Templated 3-dimensional array. More...

#include <vbl_array_3d.h>

Public Types

typedef std::size_t size_type
 
typedef T element_type
 
typedef T * iterator
 
typedef T const * const_iterator
 
typedef T & reference
 
typedef T const & const_reference
 

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. More...
 
reference operator() (size_type i1, size_type i2, size_type i3)
 
const_reference operator() (size_type i1, size_type i2, size_type i3) const
 
T *const * operator[] (size_type i1)
 
T const *const * operator[] (size_type i1) const
 
size_type get_row1_count () const
 
size_type get_row2_count () const
 
size_type get_row3_count () const
 
size_type size () const
 
size_type capacity () 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. More...
 
void get (T *array) const
 Get into array. More...
 
void fill (T const &value)
 Fill with constant. More...
 

Protected Member Functions

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

Private Attributes

element_type *** element_
 
size_type row1_count_
 
size_type row2_count_
 
size_type row3_count_
 

Detailed Description

template<class T>
class vbl_array_3d< T >

Templated 3-dimensional array.

Definition at line 38 of file vbl_array_3d.h.

Member Typedef Documentation

◆ const_iterator

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

Definition at line 52 of file vbl_array_3d.h.

◆ const_reference

template<class T>
typedef T const& vbl_array_3d< T >::const_reference

Definition at line 55 of file vbl_array_3d.h.

◆ element_type

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

Definition at line 42 of file vbl_array_3d.h.

◆ iterator

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

Definition at line 51 of file vbl_array_3d.h.

◆ reference

template<class T>
typedef T& vbl_array_3d< T >::reference

Definition at line 54 of file vbl_array_3d.h.

◆ size_type

template<class T>
typedef std::size_t vbl_array_3d< T >::size_type

Definition at line 41 of file vbl_array_3d.h.

Constructor & Destructor Documentation

◆ vbl_array_3d() [1/5]

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

Definition at line 58 of file vbl_array_3d.h.

◆ vbl_array_3d() [2/5]

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

Definition at line 61 of file vbl_array_3d.h.

◆ vbl_array_3d() [3/5]

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 64 of file vbl_array_3d.h.

◆ vbl_array_3d() [4/5]

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 69 of file vbl_array_3d.h.

◆ vbl_array_3d() [5/5]

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

Definition at line 74 of file vbl_array_3d.h.

◆ ~vbl_array_3d()

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

Definition at line 83 of file vbl_array_3d.h.

Member Function Documentation

◆ begin() [1/2]

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

Definition at line 135 of file vbl_array_3d.h.

◆ begin() [2/2]

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

Definition at line 137 of file vbl_array_3d.h.

◆ capacity()

template<class T>
size_type vbl_array_3d< T >::capacity ( ) const
inline

Definition at line 132 of file vbl_array_3d.h.

◆ construct()

template<class T >
void vbl_array_3d< T >::construct ( size_type  n1,
size_type  n2,
size_type  n3 
)
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 22 of file vbl_array_3d.hxx.

◆ data_block() [1/2]

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

Definition at line 141 of file vbl_array_3d.h.

◆ data_block() [2/2]

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

Definition at line 142 of file vbl_array_3d.h.

◆ destruct()

template<class T >
void vbl_array_3d< T >::destruct ( )
protected

Definition at line 55 of file vbl_array_3d.hxx.

◆ end() [1/2]

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

Definition at line 136 of file vbl_array_3d.h.

◆ end() [2/2]

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

Definition at line 138 of file vbl_array_3d.h.

◆ fill()

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

Fill with constant.

Definition at line 102 of file vbl_array_3d.hxx.

◆ get()

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

Get into array.

Definition at line 92 of file vbl_array_3d.hxx.

◆ get_row1_count()

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

Definition at line 127 of file vbl_array_3d.h.

◆ get_row2_count()

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

Definition at line 128 of file vbl_array_3d.h.

◆ get_row3_count()

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

Definition at line 129 of file vbl_array_3d.h.

◆ operator()() [1/2]

template<class T>
reference vbl_array_3d< T >::operator() ( size_type  i1,
size_type  i2,
size_type  i3 
)
inline

Definition at line 111 of file vbl_array_3d.h.

◆ operator()() [2/2]

template<class T>
const_reference vbl_array_3d< T >::operator() ( size_type  i1,
size_type  i2,
size_type  i3 
) const
inline

Definition at line 117 of file vbl_array_3d.h.

◆ operator=()

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

Definition at line 84 of file vbl_array_3d.h.

◆ operator==()

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

Comparison.

Definition at line 93 of file vbl_array_3d.h.

◆ operator[]() [1/2]

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

Definition at line 123 of file vbl_array_3d.h.

◆ operator[]() [2/2]

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

Definition at line 124 of file vbl_array_3d.h.

◆ resize()

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

Definition at line 70 of file vbl_array_3d.hxx.

◆ set()

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

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 82 of file vbl_array_3d.hxx.

◆ size()

template<class T>
size_type vbl_array_3d< T >::size ( ) const
inline

Definition at line 131 of file vbl_array_3d.h.

Member Data Documentation

◆ element_

template<class T>
element_type*** vbl_array_3d< T >::element_
private

Definition at line 45 of file vbl_array_3d.h.

◆ row1_count_

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

Definition at line 46 of file vbl_array_3d.h.

◆ row2_count_

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

Definition at line 47 of file vbl_array_3d.h.

◆ row3_count_

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

Definition at line 48 of file vbl_array_3d.h.


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