PGAGetRealFromBinary(1)

PGAGetRealFromBinary1

Interpets a binary string as encoding a real value and returns the real value it represents.

Usage

PGAContext *ctx

int p

int pop

int start

int end

double lower

double upper

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

Location

evaluate.c

Examples

Example:
Decode a real value from the string p in population PGA_NEWPOP.  The
value to decode lies on the interval [-10,20] and is represented
using the 20 bits in bit positions 10--29.
double x;
:
x = PGAGetRealFromBinary(ctx, p, PGA_NEWPOP, 10, 29, -10.0, 20.0);

Releases

Unchanged in 4 releases since Debian 5.0 (Lenny).

  1. 5.0–8

From pgapack 1.1.1-3 in Debian 8 (Jessie). Parsed by carta from the page's man source.