Changeset 192


Ignore:
Timestamp:
Oct 26, 2004, 8:04:52 PM (18 years ago)
Author:
Peter
Message:

modified outstream operator to be compatible with istream constructor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/matrix.cc

    r128 r192  
    207207    s.setf( ios::dec );
    208208    s.precision(12);
    209     for(size_t i=0, j=0; i<a.rows()-1; i++) {
     209    // Peter, end with an "\n" to make it compatible with stream constructor
     210    for(size_t i=0, j=0; i<a.rows(); i++) {
    210211      for (j=0; j<a.columns()-1; j++)
    211212        s << a(i,j) << "\t";
    212213      s << a(i,j) << "\n";
    213214    }
    214     for (size_t j=0; j<a.columns()-1; j++)
    215       s << a(a.rows()-1,j) << "\t";
    216     s << a(a.rows()-1,a.columns()-1);
    217215    return s;
    218216  }
Note: See TracChangeset for help on using the changeset viewer.