6 if( i<0 || j<0 ||
m<=i || n<=j || i-j>
kl || j-i>
ku ){
8 std::cerr <<
"The required component is out of the matrix size." << std::endl
9 <<
"Your input is (" << i <<
"," << j <<
"), whereas the matrix size is " <<
n <<
"x" <<
n <<
" with kl=" <<
kl <<
", ku=" <<
ku <<
"." << std::endl;
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); }
44 std::ofstream ofs(filename, std::ios::trunc);
45 ofs.setf(std::cout.flags());
46 ofs.precision(std::cout.precision());
47 ofs.width(std::cout.width());
48 ofs.fill(std::cout.fill());
50 ofs <<
"#zgbmatrix" <<
" " <<
m <<
" " <<
n <<
" " <<
kl <<
" " <<
ku << std::endl;
51 for(CPPL_INT
i=0;
i<
m;
i++){
52 const CPPL_INT jmax =std::min(
n,
i+
ku+1);
53 for(CPPL_INT j=std::max(CPPL_INT(0),
i-
kl); j<jmax; j++){
CPPL_INT ku
upper band width
comple & operator()(const CPPL_INT &, const CPPL_INT &) const
CPPL_INT kl
lower band width
void write(const char *) const
_dgematrix i(const _dgbmatrix &mat)
(DO NOT USE) Smart-temporary Complex Double-precision General Band Matrix Class
CPPL_INT m
matrix row size
comple ** darray
array of pointers of column head addresses
CPPL_INT n
matrix column size
friend _zgematrix i(const _zgbmatrix &)
std::ostream & operator<<(std::ostream &s, const _zgbmatrix &mat)