Guest User

Untitled

a guest
Sep 4th, 2015
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. #pragma once
  2.  
  3. #include <iostream>
  4. #include <fstream>
  5. #include "Matrix.h"
  6.  
  7. namespace Furdarius
  8. {
  9.     class MatrixHelpers
  10.     {
  11.     public:
  12.         template<typename _U>
  13.         static void inputFromFile(Matrix<_U> &matrix, std::fstream &file)
  14.         {
  15.             for (int i = 0; i < matrix.getSize().row; ++i)
  16.                 for (int j = 0; j < matrix.getSize().col; ++j)
  17.                     file >> matrix[i][j];
  18.         };
  19.  
  20.         static void inputSizeFromFile(Size &size, std::fstream &file);
  21.  
  22.         template<typename _T>
  23.         static void outputData(Matrix<_T> &matrix, std::ostream &out);
  24.  
  25.         static void outputSize(Size &size, std::ostream &out);
  26.     };
  27. };
Advertisement
Add Comment
Please, Sign In to add comment