File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -141,7 +141,7 @@ let prngBinomial: d3Random.RandomBinomial;
141141prngBinomial = d3Random . randomBinomial ;
142142prngBinomial = d3Random . randomBinomial . source ( seedrandom ( "Schroedinger's flea." ) ) ;
143143
144- randomNumberGenerator = prngBinomial ( 0.5 ) ;
144+ randomNumberGenerator = prngBinomial ( 10 , 0.5 ) ;
145145
146146// ------------------------------------------------------------
147147// randomGamma
Original file line number Diff line number Diff line change @@ -191,12 +191,13 @@ export const randomGeometric: RandomGeometric;
191191 */
192192export interface RandomBinomial extends RandomNumberGenerationSource {
193193 /**
194- * Returns a function for generating numbers with a geometric distribution with success probability p .
195- * The value p is in the range ( 0, 1].
194+ * Returns a function for generating random numbers with a binomial distribution with n the number of trials and p the success probability .
195+ * The value p is in the range [ 0, 1].
196196 *
197+ * @param n Number of trials
197198 * @param p Success probability
198199 */
199- ( p : number ) : ( ) => number ;
200+ ( n : number , p : number ) : ( ) => number ;
200201}
201202
202203export const randomBinomial : RandomBinomial ;
You can’t perform that action at this time.
0 commit comments