#ifndef MATIO_H #define MATIO_H #include namespace Eigen{ template void write_stream(std::ostream &ostr, const Matrix& matrix){ typename Matrix::Index rows=matrix.rows(), cols=matrix.cols(); ostr< void read_stream(std::istream &istr, Matrix& matrix){ typename Matrix::Index rows=0, cols=0; istr>>rows>>cols; matrix.resize(rows, cols); for (int r=0;r>matrix(r,c); } } // Eigen:: #endif