Changeset 106


Ignore:
Timestamp:
Jun 16, 2004, 9:39:40 AM (16 years ago)
Author:
cecilia
Message:

handling missing values, if missing in all positions
:wq

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/Merge.cc

    r105 r106  
    101101      double m = w_av.average();
    102102      // calc. U
    103       double U = 1/av.average()+w_av.squared_error();
     103      double U = -1;
     104      if(av.n()>0){ // if av not empty, else missing
     105        U = 1/av.average()+w_av.squared_error();
     106      }
    104107      // insert new values
    105108      for (vector<u_int>::const_iterator i=index.begin(); i!=index.end(); i++){
Note: See TracChangeset for help on using the changeset viewer.