26 out << setiosflags(ios::scientific | ios::showpos);
27 for (
int i = 0; i <
height; i++)
29 out <<
"[row " << i <<
"]\n";
30 for (
int j = 0; j <
width; j++)
32 out <<
Elem(i,j) <<
" ";
33 if ( !((j+1) % width_) )
virtual void Print(std::ostream &out=std::cout, int width_=4) const
Prints matrix to stream out.
virtual double & Elem(int i, int j)=0
Returns reference to a_{ij}.
int height
Dimension of the output / number of rows in the matrix.
int width
Dimension of the input / number of columns in the matrix.