6 std::cerr <<
"# [MARK] _dgbmatrix::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] _dgbmatrix::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 _dgbmatrix& mat)
32 std::cerr <<
"# [MARK] operator<<(std::ostream&, const _dgbmatrix&)"
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 _dgbmatrix::write(
const char *filename)
const
56 std::cerr <<
"# [MARK] _dgbmatrix::write(const char*) const"
60 std::ofstream s(filename, std::ios::trunc);
62 s <<
"dgbmatrix" <<
" "
63 <<
M <<
" " <<
N <<
" " <<
KL <<
" " <<
KU << std::endl;
64 for(
long i=0;
i<
M;
i++){
friend _dgematrix i(const _dgbmatrix &)
Definition: _dgbmatrix-calc.hpp:23
double max(double v1, double v2)
Return maximum.
Definition: variousFunctions.cpp:355
long KL
lower band width
Definition: _dgbmatrix.hpp:9
long M
matrix row size
Definition: _dgbmatrix.hpp:7
void destroy() const
Definition: _dgbmatrix-misc.hpp:3
long N
matrix column size
Definition: _dgbmatrix.hpp:8
double & operator()(const long &, const long &) const
Definition: _dgbmatrix-io.hpp:3
double ** Darray
array of pointers of column head addresses
Definition: _dgbmatrix.hpp:12
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
Definition: _dgbmatrix.hpp:3
long KU
upper band width
Definition: _dgbmatrix.hpp:10