1 | .TH PGACreate 8 "05/01/95" " " "PGAPack" |
---|
2 | .SH NAME |
---|
3 | PGACreate \- creates an uninitialized context variable. The Fortran version |
---|
4 | of this function call contains only the last three arguments |
---|
5 | .SH INPUT PARAMETERS |
---|
6 | .PD 0 |
---|
7 | .TP |
---|
8 | argc |
---|
9 | - address of the count of the number of command line arguments. |
---|
10 | .PD 0 |
---|
11 | .TP |
---|
12 | argv |
---|
13 | - array of command line arguments. |
---|
14 | .PD 0 |
---|
15 | .TP |
---|
16 | datatype |
---|
17 | - the data type used for the strings. Must be one of |
---|
18 | PGA_DATATYPE_BINARY, PGA_DATATYPE_CHARACTER, |
---|
19 | PGA_DATATYPE_INTEGER, PGA_DATATYPE_REAL, or PGA_DATATYPE_USER |
---|
20 | .PD 0 |
---|
21 | .TP |
---|
22 | binary |
---|
23 | -valued, character-valued, integer-valued, |
---|
24 | .PD 0 |
---|
25 | .TP |
---|
26 | real |
---|
27 | -valued, or a user-defined datatype, respectively. |
---|
28 | .PD 0 |
---|
29 | .TP |
---|
30 | len |
---|
31 | - the string length (number of genes). |
---|
32 | .PD 0 |
---|
33 | .TP |
---|
34 | maxormin |
---|
35 | - the direction of optimization. Must be one of PGA_MAXIMIZE or |
---|
36 | PGA_MINIMIZE for maximization or minimization, respectively. |
---|
37 | .PD 1 |
---|
38 | .SH OUTPUT PARAMETERS |
---|
39 | .PD 0 |
---|
40 | .TP |
---|
41 | none |
---|
42 | |
---|
43 | .PD 1 |
---|
44 | .SH SYNOPSIS |
---|
45 | .nf |
---|
46 | #include "pgapack.h" |
---|
47 | PGAContext * PGACreate(argc, argv, datatype, len, maxormin) |
---|
48 | int *argc |
---|
49 | char **argv |
---|
50 | int datatype |
---|
51 | int len |
---|
52 | int maxormin |
---|
53 | .fi |
---|
54 | .SH LOCATION |
---|
55 | create.c |
---|
56 | .SH EXAMPLE |
---|
57 | .nf |
---|
58 | Example: |
---|
59 | |
---|
60 | In C: |
---|
61 | void main(int argc, char **argv) { |
---|
62 | PGAContext *ctx; |
---|
63 | : |
---|
64 | ctx = PGACreate(&argc, argv, PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE); |
---|
65 | : |
---|
66 | // Set options here |
---|
67 | : |
---|
68 | PGASetUp(ctx); |
---|
69 | : |
---|
70 | // Run the GA here |
---|
71 | : |
---|
72 | PGADestroy(ctx); |
---|
73 | } |
---|
74 | |
---|
75 | In FORTRAN: |
---|
76 | integer ctx |
---|
77 | : |
---|
78 | ctx = PGACreate(PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE) |
---|
79 | : |
---|
80 | c Set options here |
---|
81 | : |
---|
82 | call PGASetUp(ctx) |
---|
83 | : |
---|
84 | c Run the GA here |
---|
85 | : |
---|
86 | call PGADestroy(ctx) |
---|
87 | stop |
---|
88 | end |
---|
89 | |
---|
90 | .fi |
---|