Method: Distribution::Beta::Ruby_.cdf
- Defined in:
- lib/distribution/beta/ruby.rb
.cdf(x, a, b) ⇒ Object
Gamma cumulative distribution function Translated from GSL-1.9: cdf/beta.c gsl_cdf_beta_P
31 32 33 34 35 |
# File 'lib/distribution/beta/ruby.rb', line 31 def cdf(x, a, b) return 0.0 if x <= 0.0 return 1.0 if x >= 1.0 Math::IncompleteBeta.axpy(1.0, 0.0, a, b, x) end |