File: PGACreate.8

package info (click to toggle)
pgapack 1.1-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 2,344 kB
  • ctags: 1,786
  • sloc: ansic: 10,331; fortran: 2,985; sh: 486; makefile: 462; perl: 105
file content (90 lines) | stat: -rw-r--r-- 1,504 bytes parent folder | download | duplicates (8)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
.TH PGACreate 8 "05/01/95" " " "PGAPack"
.SH NAME
PGACreate \- creates an uninitialized context variable.  The Fortran version
of this function call contains only the last three arguments
.SH INPUT PARAMETERS
.PD 0
.TP
argc
- address of the count of the number of command line arguments.
.PD 0
.TP
argv
- array of command line arguments.
.PD 0
.TP
datatype
- the data type used for the strings.  Must be one of
PGA_DATATYPE_BINARY, PGA_DATATYPE_CHARACTER,
PGA_DATATYPE_INTEGER, PGA_DATATYPE_REAL, or PGA_DATATYPE_USER
.PD 0
.TP
binary
-valued, character-valued, integer-valued,
.PD 0
.TP
real
-valued, or a user-defined datatype, respectively.
.PD 0
.TP
len
- the string length (number of genes).
.PD 0
.TP
maxormin
- the direction of optimization. Must be one of PGA_MAXIMIZE or
PGA_MINIMIZE for maximization or minimization, respectively.
.PD 1
.SH OUTPUT PARAMETERS
.PD 0
.TP
none

.PD 1
.SH SYNOPSIS
.nf
#include "pgapack.h"
PGAContext * PGACreate(argc, argv, datatype, len, maxormin)
int *argc
char **argv
int datatype
int len
int maxormin
.fi
.SH LOCATION
create.c
.SH EXAMPLE
.nf
Example:

In C:
void main(int argc, char **argv) {
PGAContext *ctx;
:
ctx = PGACreate(&argc, argv, PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE);
:
//  Set options here
:
PGASetUp(ctx);
:
//  Run the GA here
:
PGADestroy(ctx);
}

In FORTRAN:
integer ctx
:
ctx = PGACreate(PGA_DATATYPE_BINARY, 100, PGA_MAXIMIZE)
:
c       Set options here
:
call PGASetUp(ctx)
:
c       Run the GA here
:
call PGADestroy(ctx)
stop
end

.fi