1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
.TH PGAGetRealFromBinary 1 "05/01/95" " " "PGAPack"
.SH NAME
PGAGetRealFromBinary \- Interpets a binary string as encoding a real value
and returns the real value it represents.
.SH INPUT PARAMETERS
.PD 0
.TP
ctx
- context variable
.PD 0
.TP
p
- string index
.PD 0
.TP
pop
- symbolic constant of the population the string is in
.PD 0
.TP
start
- starting bit position in the binary representation
.PD 0
.TP
end
- ending bit position in the binary representation
.PD 0
.TP
lower
- lower bound of the interval the real number is defined on
.PD 0
.TP
upper
- lower bound of the interval the real number is defined on
.PD 1
.SH OUTPUT PARAMETERS
.PD 0
.TP
none
.PD 1
.SH SYNOPSIS
.nf
#include "pgapack.h"
double PGAGetRealFromBinary(ctx, p, pop, start, end, lower, upper)
PGAContext *ctx
int p
int pop
int start
int end
double lower
double upper
.fi
.SH LOCATION
evaluate.c
.SH EXAMPLE
.nf
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);
.fi
|