Function PGASetBinaryInitProb
Defined in File binary.c
Function Documentation
-
void PGASetBinaryInitProb(PGAContext *ctx, double p)
Specify the probability of initializing an allele to “1” for the binary data type.
Description
The default value is 0.5. This is used during string creation of a
PGA_DATATYPE_BINARY
string.Example
Set approximately 1 percent of all binary alleles to “1” when randomly initializing the population.
PGAContext *ctx; ... PGASetBinaryInitProb (ctx, 0.01);
- Parameters:
ctx – context variable
p – the binary initialization probability
- Returns:
None