Ignore:
Timestamp:
Feb 20, 2006, 7:37:42 PM (16 years ago)
Author:
Peter
Message:

added function generating weight matrix with respect to not-a-number vs number

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/gslapi/matrix.cc

    r444 r516  
    137137
    138138
     139  matrix matrix::nan(void) const
     140  {
     141    matrix m(rows(),columns(),1.0);
     142    for (size_t i=0; i<rows(); i++)
     143      for (size_t j=0; j<columns(); j++)
     144        if (std::isnan(operator()(i,j)))
     145          m(i,j)=0;
     146    return m;
     147  }
     148
     149
     150
    139151  // Jari, checkout GSL transpose support in GSL manual 8.4.9
    140152  void matrix::transpose(void)
Note: See TracChangeset for help on using the changeset viewer.