Last change
on this file since 816 was
816,
checked in by liveletlive, 16 years ago
|
Committing the newer version of PGAPack.
|
File size:
1.2 KB
|
Line | |
---|
1 | .TH PGAFitness 1 "05/01/95" " " "PGAPack" |
---|
2 | .SH NAME |
---|
3 | PGAFitness \- Maps the user's evaluation function value to a fitness value. |
---|
4 | First, the user's evaluation function value is translated to all positive |
---|
5 | values if any are negative. Next, this positive sequence is translated to |
---|
6 | a maximization problem if the user's optimization direction was minimization. |
---|
7 | This positive sequence is then mapped to a fitness value using linear |
---|
8 | ranking, linear normalization fitness, or the identity (i.e., the evaluation |
---|
9 | function value). This routine is usually used after PGAEvaluate is called. |
---|
10 | .SH INPUT PARAMETERS |
---|
11 | .PD 0 |
---|
12 | .TP |
---|
13 | ctx |
---|
14 | - context variable |
---|
15 | .PD 0 |
---|
16 | .TP |
---|
17 | pop |
---|
18 | - symbolic constant of the population to calculate fitness for |
---|
19 | .PD 1 |
---|
20 | .SH OUTPUT PARAMETERS |
---|
21 | .PD 0 |
---|
22 | .TP |
---|
23 | none |
---|
24 | |
---|
25 | .PD 1 |
---|
26 | .SH SYNOPSIS |
---|
27 | .nf |
---|
28 | #include "pgapack.h" |
---|
29 | void PGAFitness(ctx, popindex) |
---|
30 | PGAContext *ctx |
---|
31 | int popindex |
---|
32 | .fi |
---|
33 | .SH LOCATION |
---|
34 | fitness.c |
---|
35 | .SH EXAMPLE |
---|
36 | .nf |
---|
37 | Example: |
---|
38 | Calculate the fitness of all strings in population PGA_NEWPOP after |
---|
39 | calling PGAEvaluate to calculate the strings evaluation value. |
---|
40 | |
---|
41 | double energy(PGAContext *ctx, int p, int pop); |
---|
42 | PGAContext *ctx; |
---|
43 | : |
---|
44 | PGAEvaluate(ctx, PGA_NEWPOP, energy); |
---|
45 | PGAFitness (ctx, PGA_NEWPOP); |
---|
46 | |
---|
47 | .fi |
---|
Note: See
TracBrowser
for help on using the repository browser.