MCPcopy Create free account
hub / github.com/bighuang624/Algorithms-notes / bernoulli

Method bernoulli

code/algs4/StdRandom.java:178–182  ·  view source on GitHub ↗

Returns a random boolean from a Bernoulli distribution with success probability p . @param p the probability of returning true @return true with probability p and false with probability p @throws IllegalArgumentException unless {@code p >= 0.

(double p)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 4

mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95
mainMethod · 0.95

Calls 1

uniformMethod · 0.95

Tested by

no test coverage detected