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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 245 of file zhsmatrix-io.hpp.

References conj(), zhsmatrix::data, i(), zhsmatrix::n, and zhsmatrix::number().

246 {CPPL_VERBOSE_REPORT;
247  for(CPPL_INT i=0; i<mat.n; i++){
248  for(CPPL_INT j=0; j<=i; j++){
249  CPPL_INT c =mat.number(i,j);
250  if(c<0){
251  s << " x ";
252  }
253  else{
254  s << " " << mat.data[c].v << " ";
255  }
256  }
257  for(CPPL_INT j=i+1; j<mat.n; j++){
258  CPPL_INT c =mat.number(i,j);
259  if(c<0){
260  s << "{x}";
261  }
262  else{
263  s << "{" << std::conj(mat.data[c].v) << "}";
264  }
265  }
266  s << std::endl;
267  }
268 
269  return s;
270 }
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT number(const CPPL_INT &, const CPPL_INT &) const
CPPL_INT n
matrix column size
Definition: zhsmatrix.hpp:10
_zcovector conj(const _zcovector &vec)
std::vector< zcomponent > data
matrix data
Definition: zhsmatrix.hpp:11