Module: Distribution::Poisson::GSL_

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

Class Method Summary collapse

Class Method Details

.cdf(k, l) ⇒ Object



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

def cdf(k, l)
  return 0 if k < 0
  GSL::Cdf.poisson_P(k, l.to_f)
end

.pdf(k, l) ⇒ Object



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

def pdf(k, l)
  return 0 if k < 0
  GSL::Ran.poisson_pdf(k, l.to_f)
end