4 // -----------------------------------------------------------------------
6 // --- RandBinomial ---
7 // inlined functions implementation file
8 // -----------------------------------------------------------------------
10 // =======================================================================
11 // Gabriele Cosmo - Created: 18th August 1998
12 // =======================================================================
16 inline RandBinomial::RandBinomial(HepRandomEngine & anEngine, long n,
18 : HepRandom ( ), localEngine( &anEngine, do_nothing_deleter() ),
19 defaultN(n), defaultP(p) {}
21 inline RandBinomial::RandBinomial(HepRandomEngine * anEngine, long n,
23 : HepRandom ( ), localEngine( anEngine),
24 defaultN(n), defaultP(p) {}
26 inline double RandBinomial::shoot() {
27 return shoot( 1, 0.5 );
30 inline double RandBinomial::shoot( HepRandomEngine* anEngine ) {
31 return shoot( anEngine, 1, 0.5 );
34 inline double RandBinomial::operator()() {
35 return fire( defaultN, defaultP );
38 inline double RandBinomial::operator()( long n, double p ) {
42 inline double RandBinomial::fire() {
43 return fire( defaultN, defaultP );