MCPcopy Create free account
hub / github.com/numpy/numpy / random_geometric

Function random_geometric

numpy/random/src/distributions/distributions.c:992–998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

990}
991
992int64_t random_geometric(bitgen_t *bitgen_state, double p) {
993 if (p >= 0.333333333333333333333333) {
994 return random_geometric_search(bitgen_state, p);
995 } else {
996 return random_geometric_inversion(bitgen_state, p);
997 }
998}
999
1000RAND_INT_TYPE random_zipf(bitgen_t *bitgen_state, double a) {
1001 double am1, b;

Callers

nothing calls this directly

Calls 2

random_geometric_searchFunction · 0.85

Tested by

no test coverage detected