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

Go to the source code of this file.

Functions

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

Function Documentation

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

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

References _dgbmatrix::destroy(), i(), _dgbmatrix::kl, _dgbmatrix::ku, _dgbmatrix::m, and _dgbmatrix::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: _dgbmatrix.hpp:12
void destroy() const
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT kl
lower band width
Definition: _dgbmatrix.hpp:11
CPPL_INT n
matrix column size
Definition: _dgbmatrix.hpp:10
CPPL_INT m
matrix row size
Definition: _dgbmatrix.hpp:9