Changeset 1681


Ignore:
Timestamp:
Dec 29, 2008, 9:47:47 PM (14 years ago)
Author:
Peter
Message:

avoid copying in Matrix istream constructor

File:
1 edited

Legend:

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

    r1599 r1681  
    8181      }
    8282      nof_rows++;
    83       std::vector<double> v;
     83      data_matrix.resize(data_matrix.size()+1);
     84      std::vector<double>& v=data_matrix.back();
    8485      std::string element;
    8586      std::stringstream ss(line);
     
    119120        throw utility::IO_error(s.str());
    120121      }
    121       data_matrix.push_back(v);
    122122    }
    123123
Note: See TracChangeset for help on using the changeset viewer.