Sha256: e6f5280e1cf5c65d1daa48376dd58c05ee27cda64b7137bea9eb6a6efc3ed73f

Contents?: true

Size: 535 Bytes

Versions: 10

Compression:

Stored size: 535 Bytes

Contents

module Distribution
  module Normal
    module GSL_
      class << self
        def rng(mean=0,sigma=1,seed=nil)
          seed||=rand(10e8)
          rng=GSL::Rng.alloc(GSL::Rng::MT19937,seed)
          lambda { mean+rng.gaussian(sigma)}
        end
        def cdf(x) # :nodoc:
          GSL::Cdf::ugaussian_P(x)
        end
        def pdf(x) # :nodoc:
          GSL::Ran::gaussian_pdf(x)
        end
        def p_value(qn)
          GSL::Cdf::ugaussian_Pinv(qn)
        end
        def gsl
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
distribution-0.7.3 lib/distribution/normal/gsl.rb
distribution-0.7.2 lib/distribution/normal/gsl.rb
distribution-0.7.1 lib/distribution/normal/gsl.rb
distribution-0.7.0 lib/distribution/normal/gsl.rb
distribution-0.6.0 lib/distribution/normal/gsl.rb
distribution-0.5.0 lib/distribution/normal/gsl.rb
distribution-0.4.0 lib/distribution/normal/gsl.rb
distribution-0.3.0 lib/distribution/normal/gsl.rb
distribution-0.2.0 lib/distribution/normal/gsl.rb
distribution-0.1.0 lib/distribution/normal/gsl.rb