Changeset 1147
- Timestamp:
- Feb 25, 2008, 10:24:40 PM (16 years ago)
- Location:
- trunk/yat/utility
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/utility/Matrix.cc
r1121 r1147 70 70 : blas_result_(NULL) 71 71 { 72 if (!is.good()) 73 throw utility::IO_error("Matrix: istream is not good"); 74 72 75 // read the data file and store in stl vectors (dynamically 73 76 // expandable) … … 123 126 // manipulate the state of the stream to be good 124 127 is.clear(std::ios::goodbit); 128 129 // if stream was empty, create nothing 130 if (!nof_columns || !nof_rows) 131 return; 132 125 133 // convert the data to a gsl matrix 126 134 m_ = gsl_matrix_alloc ( nof_rows, nof_columns ); -
trunk/yat/utility/Vector.cc
r1136 r1147 74 74 : VectorMutable() 75 75 { 76 if (!is.good()) 77 throw utility::IO_error("Vector: istream is not good"); 78 76 79 // read the data file and store in stl vectors (dynamically 77 80 // expandable) … … 134 137 // manipulate the state of the stream to be good 135 138 is.clear(std::ios::goodbit); 139 140 if (!nof_columns || !nof_rows) 141 return; 142 136 143 // convert the data to a gsl vector 137 144 vec_ = gsl_vector_alloc(nof_rows*nof_columns);
Note: See TracChangeset
for help on using the changeset viewer.