Module: Distribution::Hypergeometric::GSL_

Defined in:
lib/distribution/hypergeometric/gsl.rb

Class Method Summary collapse

Class Method Details

.cdf(k, m, n, total) ⇒ Object

The GSL::Cdf function for hypergeometric



10
11
12
# File 'lib/distribution/hypergeometric/gsl.rb', line 10

def cdf(k, m, n, total) # :nodoc:
  GSL::Cdf.hypergeometric_P(k, m, total - m, n)
end

.pdf(k, m, n, total) ⇒ Object

:nodoc:



5
6
7
# File 'lib/distribution/hypergeometric/gsl.rb', line 5

def pdf(k, m, n, total)  # :nodoc:
  GSL::Ran.hypergeometric_pdf(k, m, total - m, n)
end