Top Level Namespace

Defined Under Namespace

Modules: Bernoulli, Math

Instance Method Summary collapse

Instance Method Details

#binomdist(n, p) ⇒ Object

shorthand that returns new instance of ‘Distribution::Binomial`



2
3
4
# File 'lib/bernoulli/shorthand.rb', line 2

def binomdist(n, p)
  Bernoulli::Distribution::Binomial.new(n, p)
end

#geomdist(p) ⇒ Object

shorthand that returns new instance of ‘Distribution::Geometric`



7
8
9
# File 'lib/bernoulli/shorthand.rb', line 7

def geomdist(p)
  Bernoulli::Distribution::Geometric.new(p)
end

#hgeomdist(bn, m, n) ⇒ Object

shorthand that returns new instance of ‘Distribution::Hypergeometric`



12
13
14
# File 'lib/bernoulli/shorthand.rb', line 12

def hgeomdist(bn, m, n)
  Bernoulli::Distribution::Hypergeometric.new(bn, m, n)
end

#poissondist(l) ⇒ Object

shorthand that returns new instance of ‘Distribution::Poisson`



17
18
19
# File 'lib/bernoulli/shorthand.rb', line 17

def poissondist(l)
  Bernoulli::Distribution::Poisson.new(l)
end