#include <dynamic_2D.h>
Public Types | |
enum | { array_rows = -1, array_cols = -1 } |
typedef Alloc::template rebind < Element >::other | allocator_type |
typedef std::vector< Element, allocator_type > | array_impl |
typedef dynamic_1D< Element, Alloc > | col_array_type |
typedef array_impl::const_pointer | const_pointer |
typedef array_impl::const_reference | const_reference |
typedef twod_tag | dimension_tag |
typedef dynamic< Alloc > | generator_type |
typedef Layout | layout |
typedef dynamic_memory_tag | memory_tag |
typedef array_impl::pointer | pointer |
typedef array_impl::reference | reference |
typedef resizable_tag | resizing_tag |
typedef dynamic_1D< Element, Alloc > | row_array_type |
typedef dynamic_size_tag | size_tag |
typedef dynamic_2D< Element, Layout, Alloc > | transposed_type |
typedef array_impl::value_type | value_type |
Public Member Functions | |
size_t | cols () const |
Return the number of cols in the array. | |
const_pointer | data () const |
Return access to the data as a raw pointer. | |
pointer | data () |
Return access to the data as a raw pointer. | |
const_reference | operator() (size_t row, size_t col) const |
Access the given element of the matrix. | |
reference | operator() (size_t row, size_t col) |
Access the given element of the matrix. | |
void | resize (size_t rows, size_t cols) |
Resize the array. | |
size_t | rows () const |
Return the number of rows in the array. | |
Protected Member Functions | |
dynamic_2D (size_t rows, size_t cols) | |
Construct a dynamic matrix given the dimensions. | |
dynamic_2D () | |
Construct a dynamic array with no size. | |
const_reference | get_element (size_t row, size_t col, col_major) const |
reference | get_element (size_t row, size_t col, col_major) |
const_reference | get_element (size_t row, size_t col, row_major) const |
reference | get_element (size_t row, size_t col, row_major) |
Protected Attributes | |
size_t | m_cols |
array_impl | m_data |
size_t | m_rows |
Definition at line 33 of file dynamic_2D.h.
typedef Alloc::template rebind<Element>::other cml::dynamic_2D< Element, Layout, Alloc >::allocator_type |
Definition at line 38 of file dynamic_2D.h.
typedef std::vector<Element,allocator_type> cml::dynamic_2D< Element, Layout, Alloc >::array_impl |
Definition at line 44 of file dynamic_2D.h.
typedef dynamic_1D<Element,Alloc> cml::dynamic_2D< Element, Layout, Alloc >::col_array_type |
Definition at line 73 of file dynamic_2D.h.
typedef array_impl::const_pointer cml::dynamic_2D< Element, Layout, Alloc >::const_pointer |
Definition at line 51 of file dynamic_2D.h.
typedef array_impl::const_reference cml::dynamic_2D< Element, Layout, Alloc >::const_reference |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 50 of file dynamic_2D.h.
typedef twod_tag cml::dynamic_2D< Element, Layout, Alloc >::dimension_tag |
Definition at line 66 of file dynamic_2D.h.
typedef dynamic<Alloc> cml::dynamic_2D< Element, Layout, Alloc >::generator_type |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 41 of file dynamic_2D.h.
typedef Layout cml::dynamic_2D< Element, Layout, Alloc >::layout |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 54 of file dynamic_2D.h.
typedef dynamic_memory_tag cml::dynamic_2D< Element, Layout, Alloc >::memory_tag |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 57 of file dynamic_2D.h.
typedef array_impl::pointer cml::dynamic_2D< Element, Layout, Alloc >::pointer |
Definition at line 48 of file dynamic_2D.h.
typedef array_impl::reference cml::dynamic_2D< Element, Layout, Alloc >::reference |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 49 of file dynamic_2D.h.
typedef resizable_tag cml::dynamic_2D< Element, Layout, Alloc >::resizing_tag |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 63 of file dynamic_2D.h.
typedef dynamic_1D<Element,Alloc> cml::dynamic_2D< Element, Layout, Alloc >::row_array_type |
Definition at line 72 of file dynamic_2D.h.
typedef dynamic_size_tag cml::dynamic_2D< Element, Layout, Alloc >::size_tag |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 60 of file dynamic_2D.h.
typedef dynamic_2D<Element,Layout,Alloc> cml::dynamic_2D< Element, Layout, Alloc >::transposed_type |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 69 of file dynamic_2D.h.
typedef array_impl::value_type cml::dynamic_2D< Element, Layout, Alloc >::value_type |
Reimplemented in cml::matrix< Element, dynamic< Alloc >, BasisOrient, Layout >.
Definition at line 47 of file dynamic_2D.h.
anonymous enum |
cml::dynamic_2D< Element, Layout, Alloc >::dynamic_2D | ( | ) | [inline, protected] |
cml::dynamic_2D< Element, Layout, Alloc >::dynamic_2D | ( | size_t | rows, | |
size_t | cols | |||
) | [inline, explicit, protected] |
Construct a dynamic matrix given the dimensions.
This constructor is guaranteed to throw only if the allocator throws. If the array implementation guarantees that the array data structure is not modified after an exception, then this constructor is exception-safe.
only | if the allocator throws during an allocation. |
Definition at line 90 of file dynamic_2D.h.
size_t cml::dynamic_2D< Element, Layout, Alloc >::cols | ( | ) | const [inline] |
const_pointer cml::dynamic_2D< Element, Layout, Alloc >::data | ( | ) | const [inline] |
pointer cml::dynamic_2D< Element, Layout, Alloc >::data | ( | ) | [inline] |
const_reference cml::dynamic_2D< Element, Layout, Alloc >::get_element | ( | size_t | row, | |
size_t | col, | |||
col_major | ||||
) | const [inline, protected] |
Definition at line 162 of file dynamic_2D.h.
reference cml::dynamic_2D< Element, Layout, Alloc >::get_element | ( | size_t | row, | |
size_t | col, | |||
col_major | ||||
) | [inline, protected] |
Definition at line 158 of file dynamic_2D.h.
const_reference cml::dynamic_2D< Element, Layout, Alloc >::get_element | ( | size_t | row, | |
size_t | col, | |||
row_major | ||||
) | const [inline, protected] |
Definition at line 154 of file dynamic_2D.h.
reference cml::dynamic_2D< Element, Layout, Alloc >::get_element | ( | size_t | row, | |
size_t | col, | |||
row_major | ||||
) | [inline, protected] |
Definition at line 150 of file dynamic_2D.h.
Referenced by cml::dynamic_2D< Element, Layout, Alloc >::operator()().
const_reference cml::dynamic_2D< Element, Layout, Alloc >::operator() | ( | size_t | row, | |
size_t | col | |||
) | const [inline] |
Access the given element of the matrix.
row | row of element. | |
col | column of element. |
Definition at line 126 of file dynamic_2D.h.
reference cml::dynamic_2D< Element, Layout, Alloc >::operator() | ( | size_t | row, | |
size_t | col | |||
) | [inline] |
Access the given element of the matrix.
row | row of element. | |
col | column of element. |
Definition at line 116 of file dynamic_2D.h.
void cml::dynamic_2D< Element, Layout, Alloc >::resize | ( | size_t | rows, | |
size_t | cols | |||
) | [inline] |
Resize the array.
Definition at line 143 of file dynamic_2D.h.
size_t cml::dynamic_2D< Element, Layout, Alloc >::rows | ( | ) | const [inline] |
size_t cml::dynamic_2D< Element, Layout, Alloc >::m_cols [protected] |
Definition at line 169 of file dynamic_2D.h.
Referenced by cml::dynamic_2D< Element, Layout, Alloc >::cols(), cml::dynamic_2D< Element, Layout, Alloc >::get_element(), and cml::dynamic_2D< Element, Layout, Alloc >::resize().
array_impl cml::dynamic_2D< Element, Layout, Alloc >::m_data [protected] |
Definition at line 170 of file dynamic_2D.h.
Referenced by cml::dynamic_2D< Element, Layout, Alloc >::data(), cml::dynamic_2D< Element, Layout, Alloc >::get_element(), and cml::dynamic_2D< Element, Layout, Alloc >::resize().
size_t cml::dynamic_2D< Element, Layout, Alloc >::m_rows [protected] |
Definition at line 169 of file dynamic_2D.h.
Referenced by cml::dynamic_2D< Element, Layout, Alloc >::get_element(), cml::dynamic_2D< Element, Layout, Alloc >::resize(), and cml::dynamic_2D< Element, Layout, Alloc >::rows().