Ignore:
Timestamp:
Apr 9, 2008, 6:11:07 PM (13 years ago)
Author:
Peter
Message:

replaced u_int with unsigned int or size_t

File:
1 edited

Legend:

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

    r1145 r1271  
    3737namespace statistics { 
    3838
    39   double cdf_hypergeometric_P(u_int k, u_int n1, u_int n2, u_int t)
     39  double cdf_hypergeometric_P(unsigned int k, unsigned int n1,
     40                              unsigned int n2, unsigned int t)
    4041  {
    4142    double p=0;
    42     for (u_int i=0; i<=k; i++)
     43    for (size_t i=0; i<=k; i++)
    4344      p+= gsl_ran_hypergeometric_pdf(i, n1, n2, t);
    4445    return p;
     
    4647
    4748
    48   double pearson_p_value(double r, u_int n)
     49  double pearson_p_value(double r, unsigned int n)
    4950  {
    5051    assert(n>=2);
    51     if (n<2)
     52    if (n<=2)
    5253      return std::numeric_limits<double>::quiet_NaN();
    5354    return gsl_cdf_tdist_Q(r*sqrt((n-2)/(1-r*r)), n-2);
Note: See TracChangeset for help on using the changeset viewer.