Ignore:
Timestamp:
Feb 25, 2008, 10:24:40 PM (14 years ago)
Author:
Peter
Message:

fixes #294

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/Matrix.cc

    r1121 r1147  
    7070    : blas_result_(NULL)
    7171  {
     72    if (!is.good())
     73      throw utility::IO_error("Matrix: istream is not good");
     74
    7275    // read the data file and store in stl vectors (dynamically
    7376    // expandable)
     
    123126    // manipulate the state of the stream to be good
    124127    is.clear(std::ios::goodbit);
     128   
     129    // if stream was empty, create nothing
     130    if (!nof_columns || !nof_rows)
     131      return;
     132
    125133    // convert the data to a gsl matrix
    126134    m_ = gsl_matrix_alloc ( nof_rows, nof_columns );
Note: See TracChangeset for help on using the changeset viewer.