.TH PGASetRealInitRange 2 "05/01/95" " " "PGAPack" .SH NAME PGASetRealInitRange \- sets the upper and lower bounds for randomly initializing real-valued genes. .SH DESCRIPTION For each gene these bounds define an interval from which the initial allele value is selected uniformly randomly. The user specifies two arrays containing lower and bound for each gene to define the interval. This is the default strategy for initializing real-valued strings. The default interval is $[0,1.0]$ for each gene. .SH INPUT PARAMETERS .PD 0 .TP ctx - context variable .PD 0 .TP min - array containing the lower bound of the interval for each gene .PD 0 .TP mac - array containing the upper bound of the interval for each gene .PD 1 .SH OUTPUT PARAMETERS .PD 0 .TP none .PD 1 .SH SYNOPSIS .nf #include "pgapack.h" void PGASetRealInitRange(ctx, min, max) PGAContext *ctx double *min double *max .fi .SH LOCATION real.c .SH EXAMPLE .nf Set the initialization routines to select a value for each real-valued gene i uniformly randomly from the interval [-10.,i] Assumes all strings are of the same length. PGAContext *ctx; double *low, *high; int i, stringlen; : stringlen = PGAGetStringLength(ctx); low = (double *) malloc(stringlen*sizeof(double)); high = (double *) malloc(stringlen*sizeof(double)); for(i=0;i