File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ use distributions::{Sample, IndependentSample};
15
15
use distributions:: log_gamma:: log_gamma;
16
16
use std:: f64:: consts:: PI ;
17
17
18
- /// The binomial distribution `Binomial(lambda )`.
18
+ /// The binomial distribution `Binomial(n, p )`.
19
19
///
20
20
/// This distribution has density function: `f(k) = n!/(k! (n-k)!) p^k (1-p)^(n-k)` for `k >= 0`.
21
21
///
@@ -35,8 +35,8 @@ pub struct Binomial {
35
35
}
36
36
37
37
impl Binomial {
38
- /// Construct a new `Binomial` with the given shape parameter
39
- /// `lambda` . Panics if `lambda <= 0`.
38
+ /// Construct a new `Binomial` with the given shape parameters
39
+ /// `n`, `p` . Panics if `p <= 0` or `p >= 1 `.
40
40
pub fn new ( n : u64 , p : f64 ) -> Binomial {
41
41
assert ! ( p > 0.0 , "Binomial::new called with `p` <= 0" ) ;
42
42
assert ! ( p < 1.0 , "Binomial::new called with `p` >= 1" ) ;
You can’t perform that action at this time.
0 commit comments