PGAGetRealFromGrayCode(3)

NAME
PGAGetRealFromGrayCode - interpets a binary reflected Gray code sequence in a binary string as encoding a real value and returns the real value it represents.

INPUT PARAMETERS
ctx - context variable
p   - string index
pop - symbolic constant of the population the string is in
start
    - starting bit position in the binary representation
end - ending bit position in the binary representation
lower
    - lower bound of the interval the real number is defined on
upper
    - lower bound of the interval the real number is defined on

OUTPUT PARAMETERS
none

SYNOPSIS
#include "pgapack.h"
double  PGAGetRealFromGrayCode(ctx, p, pop, start, end, lower, upper)
PGAContext *ctx
int p
int pop
int start
int end
double lower
double upper

LOCATION
binary.c

EXAMPLE
Example:
If the real value x lies on the interval [-10,20] and is represented
using the 20 bits in bit positions 10--29 in Gary coded string p in
population PGA_NEWPOP use
double x;
:
x = PGAGetRealFromGrayCode(ctx,p,PGA_NEWPOP,10,29,-10.0,20.0);
to retrieve the value of x