6 std::cerr <<
"# [MARK] _zgbmatrix::operator()(const long&, const long&) const"
11 if( i<0 || j<0 ||
M<=i || N<=j || i-j>
KL || j-i>
KU ){
12 std::cerr <<
"[ERROR] _zgbmatrix::operator()(long, long)" << std::endl
13 <<
"The required component is out of the matrix size."
15 <<
"Your input was (" << i <<
"," << j <<
")." << std::endl;
29 inline std::ostream& operator<<(std::ostream& s,
const _zgbmatrix& mat)
32 std::cerr <<
"# [MARK] operator<<(std::ostream&, const _zgbmatrix&)"
36 for(
long i=0; i<mat.
M; i++){
37 for(
long j=0; j<mat.
N; j++){
38 if( i-j>mat.
KL || j-i>mat.
KU ){ s <<
" x"; }
39 else{ s <<
" " << mat(i,j); }
53 inline void _zgbmatrix::write(
const char* filename)
const
56 std::cerr <<
"# [MARK] _zgbmatrix::write(const char*) const"
60 std::ofstream s(filename, std::ios::trunc);
62 s <<
"zgbmatrix" <<
" "
63 <<
M <<
" " <<
N <<
" " <<
KL <<
" " <<
KU << std::endl;
64 for(
long i=0;
i<
M;
i++){
65 for(
long j=max(0,
i-
KL); j<min(
N,
i+
KU+1); j++){
std::complex< double > & operator()(const long &, const long &) const
Definition: _zgbmatrix-io.hpp:3
long N
matrix column size
Definition: _zgbmatrix.hpp:8
void destroy() const
Definition: _zgbmatrix-misc.hpp:3
long KU
upper band width
Definition: _zgbmatrix.hpp:10
long M
matrix row size
Definition: _zgbmatrix.hpp:7
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
Definition: _zgbmatrix.hpp:3
std::complex< double > ** Darray
array of pointers of column head addresses
Definition: _zgbmatrix.hpp:12
long KL
lower band width
Definition: _zgbmatrix.hpp:9
friend _zgematrix i(const _zgbmatrix &)
Definition: _zgbmatrix-calc.hpp:23