Ignore:
Timestamp:
Nov 15, 2008, 5:01:46 PM (13 years ago)
Author:
Peter
Message:

closes #457 - kolmogorov_smirnov_test fails on Mac OS 10.4

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/statistics/KolmogorovSmirnov.cc

    r1617 r1626  
    2929#include <deque>
    3030#include <functional>
     31#include <limits>
    3132
    3233namespace theplu {
     
    8485      targets.push_back(i->second);
    8586
     87    double score_threshold = score()-10*std::numeric_limits<double>().epsilon();
     88
    8689    for (size_t i=0; i<perm; ++i){
    8790      random::random_shuffle(targets.begin(), targets.end());
     
    9295        ks.add(iter->first.first, *target_i, iter->first.second);
    9396     
    94       if (ks.score()>=score())
     97      if (ks.score()>=score_threshold)
    9598        ++count;
    9699    }
Note: See TracChangeset for help on using the changeset viewer.