Query: pgasetrealinitpercent
OS: debian
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
PGASetRealInitPercent(2) PGAPack PGASetRealInitPercent(2)NAMEPGASetRealInitPercent - sets the upper and lower bounds for randomly initializing real-valued genes.DESCRIPTIONFor each gene these bounds define an interval from which the initial allele value is selected uniformly randomly. With this routine the user specifies a median value and a percent offset for each allele.INPUT PARAMETERSctx - context variable median - an array containing the mean value of the interval percent - an array containing the percent offset to add and subtract to the median to define the intervalOUTPUT PARAMETERSnoneSYNOPSIS#include "pgapack.h" void PGASetRealInitPercent(ctx, median, percent) PGAContext *ctx double *median double *percentLOCATIONreal.cEXAMPLESet the initialization routines to select a value for each real-valued gene i uniformly randomly from the interval [i-v,i+v], where $v = i/2$. Assumes all strings are the same length. PGAContext *ctx; double *median, *percent; int i, stringlen; : stringlen = PGAGetStringLength(ctx); median = (double *) malloc(stringlen*sizeof(double)); percent = (double *) malloc(stringlen*sizeof(double)); for(i=0;i<stringlen;i++) { median[i] = (double) i; percent[i] = 0.5; } PGASetRealInitPercent(ctx, median, percent); 05/01/95 PGASetRealInitPercent(2)
| Related Man Pages |
|---|
| blockmedian(1) - debian |
| pgasetrealinitrange(2) - debian |
| smokeping_matchers_medratio(3) - debian |
| pgaduplicate(8) - debian |
| pgasortpop(8) - debian |
| Similar Topics in the Unix Linux Community |
|---|
| random function script |
| what the %s does percent sign-s mean? |
| array bounds and mem leak tool |
| How to select lines randomly without replacement in UNIX? |
| How to print median values of matrix -awk? |