.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