CPPLapack
 All Classes Files Functions Variables Friends Pages
Functions
dssmatrix-io.hpp File Reference

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &s, const dssmatrix &mat)
 

Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const dssmatrix mat 
)
inline

Definition at line 228 of file dssmatrix-io.hpp.

References dssmatrix::data, i(), dssmatrix::n, and dssmatrix::number().

229 {CPPL_VERBOSE_REPORT;
230  for(CPPL_INT i=0; i<mat.n; i++){
231  for(CPPL_INT j=0; j<mat.n; j++){
232  if( i >= j ){
233  CPPL_INT c =mat.number(i,j);
234  if(c<0){
235  s << " x ";
236  }
237  else{
238  s << " " << mat.data[c].v << " ";
239  }
240  }
241  else{//i<j
242  CPPL_INT c =mat.number(i,j);
243  if(c<0){
244  s << "{x}";
245  }
246  else{
247  s << "{" << mat.data[c].v << "}";
248  }
249  }
250  }
251  s << std::endl;
252  }
253 
254  return s;
255 }
std::vector< dcomponent > data
matrix data
Definition: dssmatrix.hpp:11
CPPL_INT number(const CPPL_INT &, const CPPL_INT &) const
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Definition: dssmatrix.hpp:10