Ignore:
Timestamp:
Mar 24, 2007, 3:54:42 PM (16 years ago)
Author:
Jari Häkkinen
Message:

Fixes #206.

File:
1 edited

Legend:

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

    r813 r830  
    5454    if (!m_)
    5555      throw utility::GSL_error("matrix::matrix failed to allocate memory");
    56     set_all(init_value);
     56    all(init_value);
    5757  }
    5858
     
    276276    if (!m_)
    277277      throw utility::GSL_error("matrix::matrix failed to allocate memory");
    278     set_all(init_value);
     278    all(init_value);
    279279
    280280    // no need to delete blas_result_ if the number of rows fit, it
     
    295295
    296296
    297   void matrix::set(const matrix& other)
    298   {
    299     assert(m_);
    300     if (gsl_matrix_memcpy(m_, other.gsl_matrix_p()))
    301       throw utility::GSL_error("matrix::create_gsl_matrix_copy dimension mis-match");
    302   }
    303 
    304 
    305   void matrix::set_all(const double value)
     297  void matrix::all(const double value)
    306298  {
    307299    assert(m_);
     
    310302
    311303
    312   void matrix::set_column(const size_t column, const vector& vec)
     304  void matrix::column(const size_t column, const vector& vec)
    313305  {
    314306    assert(m_);
     
    319311
    320312
    321   void matrix::set_row(const size_t row, const vector& vec)
     313  void matrix::row(const size_t row, const vector& vec)
    322314  {
    323315    assert(m_);
     
    413405  const matrix& matrix::operator=( const matrix& other )
    414406  {
    415     set(other);
     407    assert(m_);
     408    if (gsl_matrix_memcpy(m_, other.gsl_matrix_p()))
     409      throw utility::GSL_error("matrix::create_gsl_matrix_copy dimension mis-match");
    416410    return *this;
    417411  }
     
    517511      flag.clone(matrix(rows,columns,1.0));
    518512    else
    519       flag.set_all(1.0);
     513      flag.all(1.0);
    520514    bool nan=false;
    521515    for (size_t i=0; i<rows; i++)
Note: See TracChangeset for help on using the changeset viewer.