Sha256: 67ff51a64f799897d68c5adf54fb0e2cebc5b55eea7293daf8b590b2b6a2be1a

Contents?: true

Size: 401 Bytes

Versions: 7

Compression:

Stored size: 401 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 p_value(pr,l)
          GSL::Cdf.exponential_Pinv(pr,1/l.to_f)
        end
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
distribution-0.7.3 lib/distribution/exponential/gsl.rb
distribution-0.7.2 lib/distribution/exponential/gsl.rb
distribution-0.7.1 lib/distribution/exponential/gsl.rb
distribution-0.7.0 lib/distribution/exponential/gsl.rb
distribution-0.6.0 lib/distribution/exponential/gsl.rb
distribution-0.5.0 lib/distribution/exponential/gsl.rb
distribution-0.4.0 lib/distribution/exponential/gsl.rb