2 matrix-debug.cc -- implement Matrix print routines
4 source file of the Flower Library
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "flower-debug.hh"
12 #include "matrix-storage.hh"
15 Matrix::operator String() const
19 Matrix_storage const * stor_c_l = dat;
20 s=String ("matrix { (") + dat->name() + ")\n";
21 for (int i=0; i< rows(); i++)
23 for (int j = 0; j < cols(); j++)
25 s+= String (stor_c_l->elem (i,j), "%6f ");
43 Vector::operator String() const
47 s=String ("vector (") + dim () + ") [";
48 for (int i=0; i < dim(); i++)
50 s += String (dat[i], "%6f") + String (' ');
62 fdebug << *this<<'\n';