#include <array.h>
Public Types | |
typedef Storage::value_type | value_type |
Standard type. | |
typedef Storage::allocator_type | allocator_type |
Standard type. | |
typedef Storage::size_type | size_type |
Standard type. | |
typedef Storage::difference_type | difference_type |
Standard type. | |
typedef Storage::iterator | iterator |
Standard type. | |
typedef Storage::const_iterator | const_iterator |
Standard type. | |
typedef Storage::reverse_iterator | reverse_iterator |
Standard type. | |
typedef Storage::const_reverse_iterator | const_reverse_iterator |
Standard type. | |
typedef Storage::reference | reference |
Standard type. | |
typedef Storage::const_reference | const_reference |
Standard type. | |
Public Methods | |
void | assign (const size_type nx, const size_type ny, const T &val) |
Assignement of a default value. | |
void | swap (Array_2D< T, A > &a) |
Efficient swapping of two 2D arrays. | |
allocator_type | get_allocator () const |
Gives the memory allocator. | |
Array_2D (const A &a=A()) | |
Classical constructor. | |
Array_2D (const size_type nx, const size_type ny, const T &val=T(), const A &a=A()) | |
Classical constructor. | |
template<typename Element_iterator> | Array_2D (Element_iterator begin_elt, Element_iterator end_elt, const size_type nx, const size_type ny, const A &a=A()) |
Array_2D (const Array_2D< T, A > &a) | |
Classical constructor. | |
bool | empty () const |
Handle the array dimension. | |
size_type | x_size () const |
Handle the array dimension. | |
size_type | y_size () const |
Handle the array dimension. | |
size_type | size () const |
Handle the array dimension. | |
size_type | max_size () const |
Handle the array dimension. | |
void | resize (const size_type nx, const size_type ny) |
Handle the array dimension. | |
Array_2D< T, A > & | operator= (const Array_2D< T, A > &a) |
Classical operator. | |
bool | operator== (const Array_2D< T, A > &a) |
Classical operator. | |
bool | operator!= (const Array_2D< T, A > &a) |
Classical operator. | |
template<typename Vector_position> reference | operator[] (const Vector_position &v) |
Access operator. | |
template<typename Vector_position> const_reference | operator[] (const Vector_position &v) const |
Access operator. | |
reference | operator() (const size_type x, const size_type y) |
Access operator. | |
const_reference | operator() (const size_type x, const size_type y) const |
Access operator. | |
template<typename Vector_position> reference | at (const Vector_position &v) |
Access operator. | |
template<typename Vector_position> const_reference | at (const Vector_position &v) const |
Access operator. | |
reference | at (const size_type x, const size_type y) |
Access operator. | |
const_reference | at (const size_type x, const size_type y) const |
Access operator. | |
iterator | begin () |
Points on the (0,0) element. | |
const_iterator | begin () const |
Points on the (0,0) element. | |
iterator | end () |
Points on the element after (x_size()-1,y_size()-1). | |
const_iterator | end () const |
Points on the element after (x_size()-1,y_size()-1). | |
reverse_iterator | rbegin () |
Reverse iterator. | |
const_reverse_iterator | rbegin () const |
Reverse iterator. | |
reverse_iterator | rend () |
Reverse iterator. | |
const_reverse_iterator | rend () const |
Reverse iterator. |
Optimised for an access in order :
for(x=...){ for(y=...){...} }
at() and the operator[]() also accept a vector that provides an access to its elements through an [] operator.
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Standard type.
|
|
Classical constructor.
|
|
Classical constructor.
|
|
Fills in the array with the elements between Throw the length_error() exception if not enough elements. |
|
Classical constructor.
|
|
Assignement of a default value.
|
|
Access operator.
|
|
Access operator.
|
|
Access operator.
|
|
Access operator.
|
|
Points on the (0,0) element. Goes through the array in the order for(x=...){ for(y=...){...} }. |
|
Points on the (0,0) element. Goes through the array in the order for(x=...){ for(y=...){...} }. |
|
Handle the array dimension.
|
|
Points on the element after (x_size()-1,y_size()-1). Goes through the array in the order for(x=...){ for(y=...){...} }. |
|
Points on the element after (x_size()-1,y_size()-1). Goes through the array in the order for(x=...){ for(y=...){...} }. |
|
Gives the memory allocator.
|
|
Handle the array dimension.
|
|
Classical operator.
|
|
Access operator.
|
|
Access operator.
|
|
Classical operator.
|
|
Classical operator.
|
|
Access operator.
|
|
Access operator.
|
|
Reverse iterator.
|
|
Reverse iterator.
|
|
Reverse iterator.
|
|
Reverse iterator.
|
|
Handle the array dimension.
|
|
Handle the array dimension.
|
|
Efficient swapping of two 2D arrays.
|
|
Handle the array dimension.
|
|
Handle the array dimension.
|