Go to the source code of this file.
Functions | |
std::ostream & | operator<< (std::ostream &s, const _zhematrix &mat) |
std::ostream& operator<< | ( | std::ostream & | s, |
const _zhematrix & | mat | ||
) | [inline] |
Definition at line 23 of file _zhematrix-io.hpp.
References conj(), _zhematrix::darray, _zhematrix::destroy(), i(), imag(), and _zhematrix::n.
{VERBOSE_REPORT; for(long i=0; i<mat.n; i++){ for(long j=0; j<mat.n; j++){ if(i>j){ s << " " << mat(i,j) << " "; } else if(i==j){ s << " " << std::real(mat(i,i)) << " "; } else{ s << "{" << std::conj(mat.darray[i][j]) << "} "; } } s << std::endl; #ifdef CPPL_DEBUG if(std::fabs(std::imag(mat(i,i))) > DBL_MIN){ WARNING_REPORT; std::cerr << "The " << i << "th diagonal component of the zhematrix is not a real number." << std::endl; } #endif//CPPL_DEBUG } mat.destroy(); return s; }