6 if( i<0 || j<0 ||
m<=i ||
n<=j ){
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 <<
"x" <<
n <<
"." << std::endl;
23 if( i<0 || j<0 ||
m<=i ||
n<=j ){
25 std::cerr <<
"The required component is out of the matrix size." << std::endl
26 <<
"Your input is (" << i <<
"," << j <<
"), whereas the matrix size is " <<
m <<
"x" <<
n <<
"." << std::endl;
44 if( i<0 || j<0 ||
m<=i ||
n<=j ){
46 std::cerr <<
"The required component is out of the matrix size." << std::endl
47 <<
"Your input is (" << i <<
"," << j <<
"), whereas the matrix size is " <<
m <<
"x" <<
n <<
"." << std::endl;
65 for(CPPL_INT
i=0;
i<mat.
m;
i++){
66 for(CPPL_INT j=0; j<mat.
n; j++){
81 std::ofstream ofs(filename, std::ios::trunc);
82 ofs.setf(std::cout.flags());
83 ofs.precision(std::cout.precision());
84 ofs.width(std::cout.width());
85 ofs.fill(std::cout.fill());
87 ofs <<
"#dgematrix" <<
" " <<
m <<
" " <<
n << std::endl;
88 for(CPPL_INT
i=0;
i<
m;
i++){
89 for(CPPL_INT j=0; j<
n; j++ ){
100 {CPPL_VERBOSE_REPORT;
101 std::ifstream s( filename );
104 std::cerr <<
"The file \"" << filename <<
"\" can not be opened." << std::endl;
110 if(
id !=
"dgematrix" &&
id !=
"#dgematrix" ){
112 std::cerr <<
"The type name of the file \"" << filename <<
"\" is not dgematrix." << std::endl
113 <<
"Its type name was " <<
id <<
" ." << std::endl;
119 for(CPPL_INT
i=0;
i<
m;
i++){
120 for(CPPL_INT j=0; j<
n; j++ ){
126 std::cerr <<
"There is something is wrong with the file \"" << filename <<
"\"." << std::endl
127 <<
"Most likely, there is a lack of data components, or a linefeed code or space code is missing at the end of the last line." << std::endl;
134 std::cerr <<
"There is something is wrong with the file \"" << filename <<
"\"." << std::endl
135 <<
"Most likely, there are extra data components." << std::endl;
dgematrix & resize(const CPPL_INT &, const CPPL_INT &)
CPPL_INT m
matrix row size
double ** darray
array of pointers of column head addresses
std::ostream & operator<<(std::ostream &s, const dgematrix &mat)
_dgematrix i(const _dgbmatrix &mat)
double & operator()(const CPPL_INT &, const CPPL_INT &)
CPPL_INT n
matrix column size
Real Double-precision General Dence Matrix Class.
dgematrix & set(const CPPL_INT &, const CPPL_INT &, const double &)
friend _dgematrix i(const dgematrix &)
void write(const char *) const