source: trunk/optimizer/src/pgapack/pgapack/man/man8/PGAGetSortedPopIndex.8 @ 816

Last change on this file since 816 was 816, checked in by liveletlive, 16 years ago

Committing the newer version of PGAPack.

File size: 850 bytes
Line 
1.TH PGAGetSortedPopIndex 8 "05/01/95" " " "PGAPack"
2.SH NAME
3PGAGetSortedPopIndex \- returns a population string index from the array
4created by PGASortPop().
5.SH INPUT PARAMETERS
6.PD 0
7.TP
8ctx
9- context variable
10.PD 0
11.TP
12n
13- specified which index element is to be returned.
14.PD 1
15.SH OUTPUT PARAMETERS
16.PD 0
17.TP
18none
19
20.PD 1
21.SH SYNOPSIS
22.nf
23#include "pgapack.h"
24int  PGAGetSortedPopIndex(ctx, n)
25PGAContext *ctx
26int n
27.fi
28.SH LOCATION
29pop.c
30.SH EXAMPLE
31.nf
32Example:
33Copy the five best strings from the old population into the new
34population.  The rest of the new population will be created by
35recombination, and is not shown.
36
37PGAContext *ctx;
38int i,j;
39:
40PGASetPopReplaceType(ctx,PGA_POPREPL_BEST)
41PGASortPop(ctx, PGA_OLDPOP);
42for ( i=0; i < 5; i++) {
43j = PGAGetSortedPopIndex(ctx, i);
44PGACopyIndividual (ctx, j, PGA_OLDPOP, i, PGA_NEWPOP);
45:
46
47.fi
Note: See TracBrowser for help on using the repository browser.