PGARandomFlip
flip a biased coin and return PGA_TRUE if the coin is a "winner."
- Provided by: pgapack (Version: 1.1.1-3)
- Report a bug
flip a biased coin and return PGA_TRUE if the coin is a "winner."
Otherwise, return PGA_FALSE.
#include "pgapack.h" int PGARandomFlip(ctx, p) PGAContext *ctx double p
random.c
Example: To return PGA_TRUE approximately seventy percent of the time, use PGAContext *ctx; int p; : PGARandomFlip(ctx, 0.7)