|
|
constexpr | Matrix ()=default |
| | Default constructor.
|
|
constexpr | Matrix (const shape_type &shape) |
| | Create a matrix of the given shape.
|
|
constexpr | Matrix (const shape_type &shape, const T &fill_value) |
| | Create a matrix of the given shape filled with a default value.
|
|
constexpr auto | begin () noexcept |
| | Return the iterator beginning.
|
|
constexpr auto | begin () const noexcept |
| | Return the iterator beginning.
|
|
constexpr auto | end () noexcept |
| | Return the iterator end.
|
|
constexpr auto | end () const noexcept |
| | Return the iterator end.
|
|
constexpr reference | operator[] (const index_type &index) noexcept |
| | Get the item at index.
|
|
constexpr const_reference | operator[] (const index_type &index) const noexcept |
| | Get the const item at index.
|
|
constexpr reference | at (const index_type &index) |
| | Get the item at index, checking bounds.
|
|
constexpr const_reference | at (const index_type &index) const |
| | Get the const item at index, checking bounds.
|
|
constexpr const shape_type & | get_shape () const noexcept |
| | Return the shape of this matrix.
|
|
constexpr bool | in_bounds (const index_type &index) const noexcept |
| | Return true if index is within the bounds of this matrix.
|
|
constexpr | operator MatrixView< T, Dimensions > () noexcept |
| | Implicit cast to a view of this matrix.
|
|
constexpr | operator MatrixView< const T, Dimensions > () const noexcept |
| | Implicit cast to a const view of this matrix.
|
|
constexpr Container & | get_container () noexcept |
| | Get the flat container for this matrix.
|
|
constexpr const Container & | get_container () const noexcept |
| | Get the const flat container for this matrix.
|
|
template<class Archive> |
| void | serialize (Archive &archive) |
template<typename T, size_t Dimensions, typename Container = std::vector<T>>
class tcod::Matrix< T, Dimensions, Container >
A template container for holding a multi-dimensional array of items.
- Template Parameters
-
| T | The type of value contained by this matrix. |
| Dimensions | The number of dimensions of this matrix type. |
| Container | The std::vector-like container used for this matrix. |
This class is a work-in-progress.