\Brief Defines a matrix object with its own methods
This template is an abstract data type representing a 2D square (NxN) matrix.
Its underlying data container is a 1D std::vector.
It also contains several methods and operators:
- the size(), rows() and cols() methods all return the size (N) of the matrix, which is the square root of the number of elements in the 1D vector (NxN)
- the resize() method resizes the matrix by resizing the underlying data vector
- the accessor operator returns, for a pair of indexes (i, j), the element of the 1D vector at the corresponding serialized index (j * N + i)
- the /= operator handles element-wise division of the matrix by a scalar
- the data() method returns the underlying data vector
- the begin() and end() methods return iterator objects that can point to the first and last elements of the matrix, which can then be used in range for loop to iterate over the matrix elements.
This template defines a wrapper around the Matrix template in which the begin and end operators
are of type *MatrixIndexIterator*, and can then be used in different types of range for loops.
The index() method can be used to convert a "simple" Matrix object into an IndexedMatrix object.
Finally, the std::iterator_traits template is used to define the data type used by the MatrixIterator objects when they are then used in other parts of the code.