Templated 3-dimensional array. More...
#include <vbl_array_3d.h>
Public Types | |
typedef vcl_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. | |
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. | |
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 | |
element_type *** | element_ |
size_type | row1_count_ |
size_type | row2_count_ |
size_type | row3_count_ |
Templated 3-dimensional array.
Definition at line 38 of file vbl_array_3d.h.
typedef T const* vbl_array_3d< T >::const_iterator |
Definition at line 52 of file vbl_array_3d.h.
typedef T const& vbl_array_3d< T >::const_reference |
Definition at line 55 of file vbl_array_3d.h.
typedef T vbl_array_3d< T >::element_type |
Definition at line 42 of file vbl_array_3d.h.
typedef T* vbl_array_3d< T >::iterator |
Definition at line 51 of file vbl_array_3d.h.
typedef T& vbl_array_3d< T >::reference |
Definition at line 54 of file vbl_array_3d.h.
typedef vcl_size_t vbl_array_3d< T >::size_type |
Definition at line 41 of file vbl_array_3d.h.
vbl_array_3d< T >::vbl_array_3d | ( | ) | [inline] |
Definition at line 58 of file vbl_array_3d.h.
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< 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< 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< T >::vbl_array_3d | ( | vbl_array_3d< T > const & | that | ) | [inline] |
Definition at line 74 of file vbl_array_3d.h.
vbl_array_3d< T >::~vbl_array_3d | ( | ) | [inline] |
Definition at line 83 of file vbl_array_3d.h.
iterator vbl_array_3d< T >::begin | ( | ) | [inline] |
Definition at line 133 of file vbl_array_3d.h.
const_iterator vbl_array_3d< T >::begin | ( | ) | const [inline] |
Definition at line 135 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::capacity | ( | ) | const [inline] |
Definition at line 130 of file vbl_array_3d.h.
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 21 of file vbl_array_3d.txx.
T* vbl_array_3d< T >::data_block | ( | ) | [inline] |
Definition at line 139 of file vbl_array_3d.h.
T const* vbl_array_3d< T >::data_block | ( | ) | const [inline] |
Definition at line 140 of file vbl_array_3d.h.
void vbl_array_3d< T >::destruct | ( | ) | [protected] |
Definition at line 54 of file vbl_array_3d.txx.
iterator vbl_array_3d< T >::end | ( | ) | [inline] |
Definition at line 134 of file vbl_array_3d.h.
const_iterator vbl_array_3d< T >::end | ( | ) | const [inline] |
Definition at line 136 of file vbl_array_3d.h.
void vbl_array_3d< T >::fill | ( | T const & | value | ) |
Fill with constant.
Definition at line 101 of file vbl_array_3d.txx.
void vbl_array_3d< T >::get | ( | T * | array | ) | const |
Get into array.
Definition at line 91 of file vbl_array_3d.txx.
size_type vbl_array_3d< T >::get_row1_count | ( | ) | const [inline] |
Definition at line 125 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::get_row2_count | ( | ) | const [inline] |
Definition at line 126 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::get_row3_count | ( | ) | const [inline] |
Definition at line 127 of file vbl_array_3d.h.
reference vbl_array_3d< T >::operator() | ( | size_type | i1, |
size_type | i2, | ||
size_type | i3 | ||
) | [inline] |
Definition at line 109 of file vbl_array_3d.h.
const_reference vbl_array_3d< T >::operator() | ( | size_type | i1, |
size_type | i2, | ||
size_type | i3 | ||
) | const [inline] |
Definition at line 115 of file vbl_array_3d.h.
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.
bool vbl_array_3d< T >::operator== | ( | vbl_array_3d< T > const & | that | ) | const [inline] |
Comparison.
Definition at line 91 of file vbl_array_3d.h.
T* const* vbl_array_3d< T >::operator[] | ( | size_type | i1 | ) | [inline] |
Definition at line 121 of file vbl_array_3d.h.
T const* const* vbl_array_3d< T >::operator[] | ( | size_type | i1 | ) | const [inline] |
Definition at line 122 of file vbl_array_3d.h.
void vbl_array_3d< T >::resize | ( | size_type | n1, |
size_type | n2, | ||
size_type | n3 | ||
) |
Definition at line 69 of file vbl_array_3d.txx.
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 81 of file vbl_array_3d.txx.
size_type vbl_array_3d< T >::size | ( | ) | const [inline] |
Definition at line 129 of file vbl_array_3d.h.
element_type*** vbl_array_3d< T >::element_ [private] |
Definition at line 45 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::row1_count_ [private] |
Definition at line 46 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::row2_count_ [private] |
Definition at line 47 of file vbl_array_3d.h.
size_type vbl_array_3d< T >::row3_count_ [private] |
Definition at line 48 of file vbl_array_3d.h.