MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / GeomGenerator

Method GeomGenerator

inst/include/Rcpp/stats/random/rgeom.h:31–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29public:
30
31 GeomGenerator( double p ) : lambda( (1-p)/p ) {}
32
33 inline double operator()() const {
34 return ::Rf_rpois(exp_rand() * lambda);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected