simple 2D array. More...
#include <vbl_array_2d.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_2d () | |
| Default constructor. More... | |
| vbl_array_2d (size_type m, size_type n) | |
| Construct m-by-n array. More... | |
| vbl_array_2d (size_type m, size_type n, const T &v) | |
| Construct and fill an m-by-n array. More... | |
| vbl_array_2d (vbl_array_2d< T > const &that) | |
| Construct from a 2d array. More... | |
| ~vbl_array_2d () | |
| Destructor. More... | |
| vbl_array_2d< T > & | operator= (vbl_array_2d< T > const &that) |
| Assignment. More... | |
| bool | operator== (vbl_array_2d< T > const &that) const |
| Comparison. More... | |
| bool | operator!= (vbl_array_2d< T > const &that) const |
| void | fill (T value) |
| fill with ‘value’. More... | |
| void | resize (size_type m, size_type n) |
| change size. More... | |
| void | clear () |
| make as if default-constructed. More... | |
| const_reference | operator() (size_type i, size_type j) const |
| reference | operator() (size_type i, size_type j) |
| void | put (size_type i, size_type j, T const &x) |
| T | 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. More... | |
| size_type | cols () const |
| Return number of columns. More... | |
| size_type | columns () const |
| Return number of columns. More... | |
| size_type | size () const |
| Return size = (number of rows) * (number of columns). More... | |
| size_type | capacity () const |
| 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 | |
| element_type ** | rows_ |
| size_type | num_rows_ |
| size_type | num_cols_ |
simple 2D array.
Definition at line 25 of file vbl_array_2d.h.
| typedef T const* vbl_array_2d< T >::const_iterator |
Definition at line 38 of file vbl_array_2d.h.
| typedef T const& vbl_array_2d< T >::const_reference |
Definition at line 41 of file vbl_array_2d.h.
| typedef T vbl_array_2d< T >::element_type |
Definition at line 29 of file vbl_array_2d.h.
| typedef T* vbl_array_2d< T >::iterator |
Definition at line 37 of file vbl_array_2d.h.
| typedef T& vbl_array_2d< T >::reference |
Definition at line 40 of file vbl_array_2d.h.
| typedef std::size_t vbl_array_2d< T >::size_type |
Definition at line 28 of file vbl_array_2d.h.
|
inline |
Default constructor.
Definition at line 45 of file vbl_array_2d.h.
|
inline |
Construct m-by-n array.
Definition at line 48 of file vbl_array_2d.h.
|
inline |
Construct and fill an m-by-n array.
Definition at line 51 of file vbl_array_2d.h.
|
inline |
Construct from a 2d array.
Definition at line 54 of file vbl_array_2d.h.
|
inline |
Destructor.
Definition at line 60 of file vbl_array_2d.h.
|
inline |
Definition at line 138 of file vbl_array_2d.h.
|
inline |
Definition at line 141 of file vbl_array_2d.h.
|
inline |
Definition at line 132 of file vbl_array_2d.h.
|
inline |
make as if default-constructed.
Definition at line 103 of file vbl_array_2d.h.
|
inline |
Return number of columns.
Definition at line 125 of file vbl_array_2d.h.
|
inline |
Return number of columns.
Definition at line 128 of file vbl_array_2d.h.
|
inlineprivate |
Definition at line 145 of file vbl_array_2d.h.
|
inlineprivate |
Definition at line 151 of file vbl_array_2d.h.
|
inlineprivate |
Definition at line 165 of file vbl_array_2d.h.
|
inline |
Definition at line 139 of file vbl_array_2d.h.
|
inline |
Definition at line 142 of file vbl_array_2d.h.
|
inline |
fill with ‘value’.
Definition at line 88 of file vbl_array_2d.h.
|
inline |
Definition at line 115 of file vbl_array_2d.h.
|
inline |
Definition at line 134 of file vbl_array_2d.h.
|
inline |
Definition at line 135 of file vbl_array_2d.h.
|
inline |
Definition at line 83 of file vbl_array_2d.h.
|
inline |
Definition at line 111 of file vbl_array_2d.h.
|
inline |
Definition at line 112 of file vbl_array_2d.h.
|
inline |
Assignment.
Definition at line 63 of file vbl_array_2d.h.
|
inline |
Comparison.
Definition at line 72 of file vbl_array_2d.h.
|
inline |
Definition at line 117 of file vbl_array_2d.h.
|
inline |
Definition at line 118 of file vbl_array_2d.h.
|
inline |
Definition at line 114 of file vbl_array_2d.h.
|
inline |
change size.
Definition at line 95 of file vbl_array_2d.h.
|
inline |
Return number of rows.
Definition at line 122 of file vbl_array_2d.h.
|
inline |
Return size = (number of rows) * (number of columns).
Definition at line 131 of file vbl_array_2d.h.
|
private |
Definition at line 34 of file vbl_array_2d.h.
|
private |
Definition at line 33 of file vbl_array_2d.h.
|
private |
Definition at line 32 of file vbl_array_2d.h.
1.8.15