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 (" <<
m <<
"," <<
n <<
" , " <<
kl <<
"," <<
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 <<
"#dgbmatrix" <<
" " <<
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++){
friend _dgematrix i(const _dgbmatrix &)
double ** darray
array of pointers of column head addresses
CPPL_INT ku
upper band width
std::ostream & operator<<(std::ostream &s, const _dgbmatrix &mat)
_dgematrix i(const _dgbmatrix &mat)
CPPL_INT kl
lower band width
CPPL_INT n
matrix column size
double & operator()(const CPPL_INT &, const CPPL_INT &) const
void write(const char *) const
(DO NOT USE) Smart-temporary Real Double-precision General Band Matrix Class
CPPL_INT m
matrix row size