aboutsummaryrefslogtreecommitdiff
path: root/src/matrix.tpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/matrix.tpp')
-rw-r--r--src/matrix.tpp62
1 files changed, 0 insertions, 62 deletions
diff --git a/src/matrix.tpp b/src/matrix.tpp
deleted file mode 100644
index b9fa495..0000000
--- a/src/matrix.tpp
+++ /dev/null
@@ -1,62 +0,0 @@
-#include "matrix.hpp"
-#include <iostream>
-
-template <typename Element>
-Matrix<Element>::Matrix(unsigned int rows, unsigned int columns)
-{
- _rows = rows;
- _columns = columns;
-
- _matrix.reserve(rows);
- _matrix.assign(_matrix.capacity(), std::vector<Element>(columns));
-};
-
-template <typename Element>
-void Matrix<Element>::fill(Element element)
-{
- for (unsigned int row = 0U; row < _matrix.capacity(); row++)
- {
- std::vector<Element> row_vector = _matrix[row];
-
- for (unsigned int column = 0U; column < row_vector.capacity(); column++)
- _matrix[row][column] = element;
- }
-}
-
-template <typename Element>
-void Matrix<Element>::print()
-{
- for (std::vector<Element> row : _matrix)
- {
- for (Element element : row)
- std::cout << element;
-
- std::cout << "\n";
- }
-
- std::cout << std::flush;
-}
-
-template <typename Element>
-Element Matrix<Element>::get(Vector2 pos)
-{
- return _matrix[pos.y()][pos.x()];
-}
-
-template <typename Element>
-void Matrix<Element>::set(Vector2 pos, Element element)
-{
- _matrix[pos.y()][pos.x()] = element;
-}
-
-template <typename Element>
-unsigned int Matrix<Element>::rows()
-{
- return _rows;
-}
-
-template <typename Element>
-unsigned int Matrix<Element>::columns()
-{
- return _columns;
-}