#include <_matrix.hpp>

Public Types | |
| typedef T::size_type | size_type |
| Typename for the index type and matrix size type. | |
| typedef T::value_type::value_type | value_type |
| Typename for the matrix elements. | |
Static Public Member Functions | |
| static size_type | get_number_of_rows (const T &x) |
| Returns the height of the matrix. | |
| static size_type | get_number_of_columns (const T &x) |
| Returns the width of the matrix. | |
| static value_type | get_element (const T &x, const size_type &r, const size_type &c) |
| Gets element of a matrix by index. | |
| static void | set_element (T &x, const size_type &r, const size_type &c, const value_type &v) |
| Modifies value of element with given index. | |
| static void | construct (T &x, const size_type &r, const size_type &c) |
| Constructs matrix with the given dimensions. | |
This is a "non-intrusive" interface for the matrix type. A type is matrix if it is possible to query it's dimensions and to access it's elements by indices in constant-time.
The default implementation is made so that std::vector< std::vector<T> > automatically becomes a model of this concept.
| static size_type instigate::stl::matrix::interface< T >::get_number_of_rows | ( | const T & | x | ) | [inline, static] |
Returns the height of the matrix.
| x | The matrix. |
Referenced by instigate::stl::matrix::interface< T >::get_element(), and instigate::stl::matrix::interface< T >::set_element().
| static size_type instigate::stl::matrix::interface< T >::get_number_of_columns | ( | const T & | x | ) | [inline, static] |
Returns the width of the matrix.
| x | The matrix. |
Referenced by instigate::stl::matrix::interface< T >::get_element(), and instigate::stl::matrix::interface< T >::set_element().
| static value_type instigate::stl::matrix::interface< T >::get_element | ( | const T & | x, | |
| const size_type & | r, | |||
| const size_type & | c | |||
| ) | [inline, static] |
Gets element of a matrix by index.
| x | The matrix. | |
| r | The row of the element. | |
| c | The column of element. |
References instigate::stl::matrix::interface< T >::get_number_of_columns(), and instigate::stl::matrix::interface< T >::get_number_of_rows().
| static void instigate::stl::matrix::interface< T >::set_element | ( | T & | x, | |
| const size_type & | r, | |||
| const size_type & | c, | |||
| const value_type & | v | |||
| ) | [inline, static] |
Modifies value of element with given index.
| x | The matrix. | |
| r | The row number of the element. | |
| c | The column number of the element. | |
| v | The new value for the element. |
References instigate::stl::matrix::interface< T >::get_number_of_columns(), and instigate::stl::matrix::interface< T >::get_number_of_rows().
| static void instigate::stl::matrix::interface< T >::construct | ( | T & | x, | |
| const size_type & | r, | |||
| const size_type & | c | |||
| ) | [inline, static] |