PGAGetIntegerFromGrayCode1
Interpets a binary reflected gray code sequence as encoding an integer value and returns the integer value it represents.
Usage
PGAContext *ctx
int p
int pop
int start
int end
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 |
Output parameters
- none
Location
evaluate.c
Examples
Example: Get an integer j from bits 10--29 of string p in population PGA_NEWPOP. The string is encoded in Gray code. PGAContext *ctx; int j, p; : j = PGAGetIntegerFromGrayCode(ctx, p, PGA_NEWPOP, 10, 29);
Releases
Unchanged in 4 releases since Debian 5.0 (Lenny).