Module: Distribution::Exponential::GSL_
- Defined in:
- lib/distribution/exponential/gsl.rb
Class Method Summary collapse
Class Method Details
.cdf(x, l) ⇒ Object
9 10 11 12 |
# File 'lib/distribution/exponential/gsl.rb', line 9 def cdf(x,l) return 0 if x<0 GSL::Cdf.exponential_P(x,1/l.to_f) end |
.p_value(pr, l) ⇒ Object
13 14 15 |
# File 'lib/distribution/exponential/gsl.rb', line 13 def p_value(pr,l) GSL::Cdf.exponential_Pinv(pr,1/l.to_f) end |
.pdf(x, l) ⇒ Object
5 6 7 8 |
# File 'lib/distribution/exponential/gsl.rb', line 5 def pdf(x,l) return 0 if x<0 GSL::Ran.exponential_pdf(x,1/l.to_f) end |