Changeset 1287 for trunk/yat


Ignore:
Timestamp:
Apr 24, 2008, 11:24:12 PM (13 years ago)
Author:
Peter
Message:

Fixes #87 - replace cumulative hypergeometric with GSL implementation
NOTE: This means that yat 0.5 will require GSL 1.8 or
later. configure.ac is updated to check for that.

File:
1 edited

Legend:

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

    r1275 r1287  
    4040                              unsigned int n2, unsigned int t)
    4141  {
    42     double p=0;
    43     for (size_t i=0; i<=k; i++)
    44       p+= gsl_ran_hypergeometric_pdf(i, n1, n2, t);
    45     return p;
     42    return gsl_cdf_hypergeometric_P(k, n1, n2, t);
    4643  }
    4744
Note: See TracChangeset for help on using the changeset viewer.