CPPLapack
 All Classes Files Functions Variables Friends
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 212 of file zhsmatrix-io.hpp.

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

{VERBOSE_REPORT;
  for(long i=0; i<mat.n; i++){
    for(long j=0; j<mat.n; j++){
      if( i >= j ){
        long c =mat.number(i,j);
        if(c<0){
          s << " x ";
        }
        else{
          s << " " << mat.data[c].v << " ";
        }
      }
      else{//i<j
        long c =mat.number(i,j);
        if(c<0){
          s << "{x}";
        }
        else{
          s << "{" << std::conj(mat.data[c].v) << "}";
        }
      }
    }
    s << std::endl;
  }
  
  return s;
}
 All Classes Files Functions Variables Friends