Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &s, const _dssmatrix &mat) |
std::ostream& operator<< | ( | std::ostream & | s, |
const _dssmatrix & | mat | ||
) | [inline] |
Definition at line 29 of file _dssmatrix-io.hpp.
References _dssmatrix::data, _dssmatrix::destroy(), i(), _dssmatrix::line, and _dssmatrix::n.
{VERBOSE_REPORT; for(long i=0; i<mat.n; i++){ for(long j=0; j<mat.n; j++){ if( i >= j ){ std::vector<uint32_t>::iterator q; for(q=mat.line[i].begin(); q!=mat.line[i].end(); q++){ if(long(mat.data[*q].j)==j){ break; } } if(q!=mat.line[i].end()){ s << " " << mat.data[*q].v << " "; } else{ s << " x "; } } else{//i<j std::vector<uint32_t>::iterator q; for(q=mat.line[i].begin(); q!=mat.line[i].end(); q++){ if(long(mat.data[*q].j)==j){ break; } } if(q!=mat.line[i].end()){ s << "{" << mat.data[*q].v << "}"; } else{ s << "{x}"; } } } s << std::endl; } mat.destroy(); return s; }