Sha256: 1601399970498ed566603d83cfac7dbf3d72e406d7230b34bbce9721d69f2849
Contents?: true
Size: 463 Bytes
Versions: 1
Compression:
Stored size: 463 Bytes
Contents
module Distribution module Exponential module GSL_ class << self def pdf(x, l) return 0 if x < 0 GSL::Ran.exponential_pdf(x, 1 / l.to_f) end def cdf(x, l) return 0 if x < 0 GSL::Cdf.exponential_P(x, 1 / l.to_f) end def quantile(pr, l) GSL::Cdf.exponential_Pinv(pr, 1 / l.to_f) end alias_method :p_value, :quantile end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
distribution-0.8.0 | lib/distribution/exponential/gsl.rb |