Ignore:
Timestamp:
Dec 30, 2008, 11:00:24 PM (14 years ago)
Author:
Peter
Message:

fixes #455

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/kolmogorov_smirnov_test.cc

    r1626 r1687  
    3535void test_p_value(test::Suite&);
    3636void test_reset(test::Suite&);
     37void test_ties(test::Suite&);
    3738
    3839int main(int argc, char* argv[])
     
    4445  test_p_value(suite);
    4546  test_reset(suite);
     47  test_ties(suite);
    4648
    4749  return suite.return_value();
     
    150152  suite.add(suite.equal(ks.p_value(), p));
    151153}
     154
     155
     156void test_ties(test::Suite& suite)
     157{
     158  suite.err() << "test ties" << std::endl;
     159  statistics::KolmogorovSmirnov ks;
     160  for (size_t i=0; i<5; ++i)
     161    ks.add(i, true);
     162  ks.add(0, false);
     163  suite.equal(ks.score(), 1.0-0.2);
     164}
Note: See TracChangeset for help on using the changeset viewer.