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

Go to the source code of this file.

Functions

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

Function Documentation

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

Definition at line 29 of file _zgsmatrix-io.hpp.

References _zgsmatrix::data, _zgsmatrix::destroy(), i(), _zgsmatrix::m, _zgsmatrix::n, and _zgsmatrix::rows.

30 {CPPL_VERBOSE_REPORT;
31  for(CPPL_INT i=0; i<mat.m; i++){
32  for(CPPL_INT j=0; j<mat.n; j++){
33  std::vector<CPPL_INT>::iterator q;
34  const std::vector<CPPL_INT>::iterator mat_rows_i_end =mat.rows[i].end();
35  for(q=mat.rows[i].begin(); q!=mat_rows_i_end; q++){
36  if( mat.data[*q].j==j ){ break; }
37  }
38  if(q!=mat_rows_i_end){ s << " " << mat.data[*q].v; }
39  else{ s << " x"; }
40  }
41  s << std::endl;
42  }
43 
44  mat.destroy();
45  return s;
46 }
std::vector< std::vector< CPPL_INT > > rows
array of vector to store the entry information of component for each row
Definition: _zgsmatrix.hpp:12
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT n
matrix column size
Definition: _zgsmatrix.hpp:10
CPPL_INT m
matrix row size
Definition: _zgsmatrix.hpp:9
void destroy() const
std::vector< zcomponent > data
matrix data
Definition: _zgsmatrix.hpp:11