Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include <iostream>
- #include <fstream>
- #include "Matrix.h"
- namespace Furdarius
- {
- class MatrixHelpers
- {
- public:
- template<typename _U>
- static void inputFromFile(Matrix<_U> &matrix, std::fstream &file)
- {
- for (int i = 0; i < matrix.getSize().row; ++i)
- for (int j = 0; j < matrix.getSize().col; ++j)
- file >> matrix[i][j];
- };
- static void inputSizeFromFile(Size &size, std::fstream &file);
- template<typename _T>
- static void outputData(Matrix<_T> &matrix, std::ostream &out);
- static void outputSize(Size &size, std::ostream &out);
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment