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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 23 of file _zgbmatrix-io.hpp.

References _zgbmatrix::destroy(), i(), _zgbmatrix::kl, _zgbmatrix::ku, _zgbmatrix::m, and _zgbmatrix::n.

24 {CPPL_VERBOSE_REPORT;
25  for(CPPL_INT i=0; i<mat.m; i++){
26  for(CPPL_INT j=0; j<mat.n; j++){
27  if( i-j>mat.kl || j-i>mat.ku ){ s << " x"; }
28  else{ s << " " << mat(i,j); }
29  }
30  s << std::endl;
31  }
32 
33  mat.destroy();
34  return s;
35 }
CPPL_INT ku
upper band width
Definition: _zgbmatrix.hpp:12
CPPL_INT kl
lower band width
Definition: _zgbmatrix.hpp:11
_dgematrix i(const _dgbmatrix &mat)
void destroy() const
CPPL_INT m
matrix row size
Definition: _zgbmatrix.hpp:9
CPPL_INT n
matrix column size
Definition: _zgbmatrix.hpp:10