Rechercher une page de manuel
PGARandomFlip
Langue: en
Version: 301315 (debian - 07/07/09)
Section: 5 (Format de fichier)
NAME
PGARandomFlip - flip a biased coin and return PGA_TRUE if the coin is a "winner."DESCRIPTION
Otherwise, return PGA_FALSE.INPUT PARAMETERS
- ctx
- - context variable
- p
- - biased probability (.5 is a fair coin)
OUTPUT PARAMETERS
- none
SYNOPSIS
#include "pgapack.h" int PGARandomFlip(ctx, p) PGAContext *ctx double p
LOCATION
random.cEXAMPLE
Example: To return PGA_TRUE approximately seventy percent of the time, use PGAContext *ctx; int p; : PGARandomFlip(ctx, 0.7)
Contenus ©2006-2024 Benjamin Poulain
Design ©2006-2024 Maxime Vantorre