#ifndef MATRIX_H
#define MATRIX_H
#include <iostream>
using namespace std;
template <typename E>
class Matrix
{
public:
int rows,cols,length;
Matrix(int _m,int _n);
Matrix(const Matrix<E> &M) ;
~Matrix();
Matrix<E> & operator+(Matrix<E> &M);
Matrix<E> & operator-(Matrix<E> &M);
Matrix<E> & operator=(const Matrix<E> &M);
Matrix<E> & T();
E& operator()(int i,int j)
{
if ( (i>=0 && i<rows) &&(j>=0 && j<cols ) ){