6 if( i<0 || j<0 ||
n<=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 " <<
n <<
"x" <<
n <<
"." << std::endl;
28 if( i<0 || j<0 ||
n<=i ||
n<=j ){
30 std::cerr <<
"The required component is out of the matrix size." << std::endl
31 <<
"Your input is (" << i <<
"," << j <<
"), whereas the matrix size is " <<
n <<
"x" <<
n <<
"." << std::endl;
54 if( i<0 || j<0 ||
n<=i ||
n<=j ){
56 std::cerr <<
"The required component is out of the matrix size." << std::endl
57 <<
"Your input is (" << i <<
"," << j <<
"), whereas the matrix size is " <<
n <<
"x" <<
n <<
"." << std::endl;
79 for(CPPL_INT
i=0;
i<mat.
n;
i++){
80 for(CPPL_INT j=0; j<=
i; j++){
81 s <<
" " << mat(
i,j) <<
" ";
83 for(CPPL_INT j=
i+1; j<mat.
n; j++){
84 s <<
"{" << mat(
i,j) <<
"}";
98 std::ofstream ofs(filename, std::ios::trunc);
99 ofs.setf(std::cout.flags());
100 ofs.precision(std::cout.precision());
101 ofs.width(std::cout.width());
102 ofs.fill(std::cout.fill());
104 ofs <<
"#dsymatrix " <<
n << std::endl;
105 for(CPPL_INT
i=0;
i<
n;
i++){
106 for(CPPL_INT j=0; j<=
i; j++){
117 {CPPL_VERBOSE_REPORT;
118 std::ifstream s(filename);
121 std::cerr <<
"The file \"" << filename <<
"\" can not be opened." << std::endl;
127 if(
id !=
"dsymatrix" &&
id !=
"#dsymatrix" ){
129 std::cerr <<
"The type name of the file \"" << filename <<
"\" is not dsymatrix." << std::endl
130 <<
"Its type name was " <<
id <<
" ." << std::endl;
136 for(CPPL_INT
i=0;
i<
n;
i++){
137 for(CPPL_INT j=0; j<=
i; j++ ){
143 std::cerr <<
"There is something is wrong with the file \"" << filename <<
" ." << std::endl
144 <<
"Most likely, there is not enough data components, or a linefeed code or space code is missing at the end of the last line." << std::endl;
151 std::cerr <<
"There is something is wrong with the file \"" << filename <<
"\"." << std::endl
152 <<
"Most likely, there are extra data components." << std::endl;
_dgematrix i(const _dgbmatrix &mat)
dsymatrix & set(const CPPL_INT &, const CPPL_INT &, const double &)
Real Double-precision Symmetric Matrix Class [l-type (UPLO=l) Strage].
friend _dsymatrix i(const dsymatrix &)
CPPL_INT n
matrix column size
double & operator()(const CPPL_INT &, const CPPL_INT &)
std::ostream & operator<<(std::ostream &s, const dsymatrix &mat)
dsymatrix & resize(const CPPL_INT &)
void write(const char *) const
double ** darray
array of pointers of column head addresses