Inheritance diagram for Torus:
This class template provides a wrapping 2d array. Row and column references off the end (or beginning) of the array are wrapped to fall inside of the range of the array.
Definition at line 284 of file Array.H.
Public Types | |
STL integration | |
typedef T | value_type |
typedef value_type * | pointer |
typedef const value_type * | const_pointer |
typedef value_type & | reference |
typedef const value_type & | const_reference |
typedef ptrdiff_t | difference_type |
typedef size_t | size_type |
typedef pointer | iterator |
typedef const_pointer | const_iterator |
typedef std::reverse_iterator< iterator > | reverse_iterator |
typedef std::reverse_iterator< const_iterator > | const_reverse_iterator |
Public Member Functions | |
Torus (const int rows, const int columns) | |
Torus (const int rows, const int columns, const T &value) | |
Torus (const Torus< T > &torus) | |
~Torus () | |
Element access | |
reference | operator() (const size_type row, const size_type column) |
const_reference | operator() (const size_type row, const size_type column) const |
Private Member Functions | |
int | wrap_index (const int index, const int size) const |
typedef T value_type |
typedef value_type* pointer |
typedef const value_type* const_pointer |
typedef value_type& reference |
typedef const value_type& const_reference |
typedef ptrdiff_t difference_type |
typedef const_pointer const_iterator |
typedef std::reverse_iterator<iterator> reverse_iterator |
typedef std::reverse_iterator<const_iterator> const_reverse_iterator |
Torus | ( | const int | rows, | |
const int | columns, | |||
const T & | value | |||
) | [inline] |
Reimplemented from Array2d.
Definition at line 314 of file Array.H.
References Array2d::columns(), Array2d::rows(), and wrap_index().
const_reference operator() | ( | const size_type | row, | |
const size_type | column | |||
) | const [inline] |
Reimplemented from Array2d.
Definition at line 316 of file Array.H.
References Array2d::columns(), Array2d::rows(), and wrap_index().
int wrap_index | ( | const int | index, | |
const int | size | |||
) | const [inline, private] |