Last change
on this file since 816 was
816,
checked in by liveletlive, 16 years ago
|
Committing the newer version of PGAPack.
|
File size:
918 bytes
|
Line | |
---|
1 | .TH PGAEncodeIntegerAsBinary 1 "05/01/95" " " "PGAPack" |
---|
2 | .SH NAME |
---|
3 | PGAEncodeIntegerAsBinary \- encodes an integer value as a binary string |
---|
4 | .SH INPUT PARAMETERS |
---|
5 | .PD 0 |
---|
6 | .TP |
---|
7 | ctx |
---|
8 | - context variable |
---|
9 | .PD 0 |
---|
10 | .TP |
---|
11 | p |
---|
12 | - string index |
---|
13 | .PD 0 |
---|
14 | .TP |
---|
15 | pop |
---|
16 | - symbolic constant of the population the string is in |
---|
17 | .PD 0 |
---|
18 | .TP |
---|
19 | start |
---|
20 | - starting bit position in p to encode val in |
---|
21 | .PD 0 |
---|
22 | .TP |
---|
23 | end |
---|
24 | - ending bit position in p to encode val in |
---|
25 | .PD 0 |
---|
26 | .TP |
---|
27 | val |
---|
28 | - the integer value to be represented as a binary string |
---|
29 | .PD 1 |
---|
30 | .SH OUTPUT PARAMETERS |
---|
31 | .PD 0 |
---|
32 | .TP |
---|
33 | side |
---|
34 | -effect. |
---|
35 | .PD 1 |
---|
36 | .SH SYNOPSIS |
---|
37 | .nf |
---|
38 | #include "pgapack.h" |
---|
39 | void PGAEncodeIntegerAsBinary(ctx, p, pop, start, end, val) |
---|
40 | PGAContext *ctx |
---|
41 | int p |
---|
42 | int pop |
---|
43 | int start |
---|
44 | int end |
---|
45 | int val |
---|
46 | .fi |
---|
47 | .SH LOCATION |
---|
48 | evaluate.c |
---|
49 | .SH EXAMPLE |
---|
50 | .nf |
---|
51 | Encode an integer v in 20 bits in bit positions 0--19 in string p |
---|
52 | in population PGA_NEWPOP. |
---|
53 | |
---|
54 | PGAContext *ctx; |
---|
55 | int v, p; |
---|
56 | : |
---|
57 | PGAEncodeIntegerAsBinary(ctx, p, PGA_NEWPOP, 0, 19, v); |
---|
58 | |
---|
59 | .fi |
---|
Note: See
TracBrowser
for help on using the repository browser.