Changeset 1687 for trunk/yat/statistics
 Timestamp:
 Dec 30, 2008, 11:00:24 PM (13 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/yat/statistics/KolmogorovSmirnov.cc
r1626 r1687 143 143 double f1=0; 144 144 double f2=0; 145 // Peter, we should take care of ties!146 145 while(iter!=data_.end()){ 147 if (iter>second) 148 f1 += iter>first.second; 149 else 150 f2 += iter>first.second; 151 res.push_back(f1/sum_w1_f2/sum_w2_); 152 ++iter; 146 size_t count=0; 147 double value = iter>first.first; 148 while (iter!=data_.end() && iter>first.first==value) { 149 if (iter>second) { 150 f1 += iter>first.second; 151 } 152 else { 153 f2 += iter>first.second; 154 } 155 ++count; 156 ++iter; 157 } 158 res.resize(res.size()+count, f1/sum_w1_f2/sum_w2_); 153 159 } 154 160 }
Note: See TracChangeset
for help on using the changeset viewer.