File: java.rb

package info (click to toggle)
ruby-distribution 0.7.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 624 kB
  • ctags: 379
  • sloc: ruby: 4,283; makefile: 7
file content (31 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
module Distribution
  module Poisson
    module Java_
      class << self
      #==
      # Create the PoissonDistributionImpl object for use in calculations
      # with mean of l
      def create_distribution(l)
        PoissonDistributionImpl.new(l)
      end
      
      #==
      # 
      def pdf(k,l)
        dist = create_distribution(l)
        dist.probability(k)
      end
      
      def cdf(k,l)
        dist = create_distribution(l)
        dist.cumulativeProbability(k)
      end
      
#      def p_value(pr,l)
#        dist = create_distribution(l)
#        dist.inverseCumulativeProbability(pr)
#      end
      end
    end
  end
end