Ignore:
Timestamp:
Jan 7, 2007, 2:48:38 PM (16 years ago)
Author:
Peter
Message:

moving vector matrix multiplication to matrix.h and matrix.cc

File:
1 edited

Legend:

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

    r734 r737  
    437437  }
    438438
     439
     440  vector operator*(const matrix& m, const vector& v)
     441  {
     442    utility::vector res(m.rows());
     443    for (size_t i=0; i<res.size(); ++i)
     444      res(i) = vector(m,i) * v;
     445    return res;
     446  }
     447
     448
     449  vector operator*(const vector& v, const matrix& m)
     450  {
     451    utility::vector res(m.columns());
     452    for (size_t i=0; i<res.size(); ++i)
     453      res(i) = v * vector(m,i,false);
     454    return res;
     455  }
     456
    439457}}} // of namespace utility, yat and thep
Note: See TracChangeset for help on using the changeset viewer.