PGASetRealInitLU(1)

NAME
PGASetRealInitLU - sets the upper and lower bounds for randomly initializing real-valued genes. 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.

INPUT PARAMETERS
ctx - context variable
min - array containing the lower bound of the interval for each gene
mac - array containing the upper bound of the interval for each gene

OUTPUT PARAMETERS
none

SYNOPSIS
#include "pgapack.h"
void  PGASetRealInitLU(ctx, min, max)
PGAContext *ctx
double *min
double *max

LOCATION
real.c

EXAMPLE
Example:
This example will select a value for each real-valued gene i uniformly
randomly from the interval [-10.,i]
PGAContext *ctx;
double *low, *high;
int i, stringlen;
:
stringlen = PGAGetStringLen(ctx);
low  = (double *) malloc(stringlen*sizeof(double));
high = (double *) malloc(stringlen*sizeof(double));
for(i=0;i<stringlen;i++) {
low[i]  = -10.0;
high[i] = i;
}
PGASetRealInitLU(ctx, low, high);