Last change
on this file since 815 was
815,
checked in by liveletlive, 16 years ago
|
Committing the /tmp/gekco/pgapack folder that contains the older PGAPack version and Prof. Klimecks changes to it.
|
File size:
907 bytes
|
Line | |
---|
1 | .TH PGASetCharacterAllele 1 "05/01/95" " " "PGAPack" |
---|
2 | .SH NAME |
---|
3 | PGASetCharacterAllele \- sets the value of an allele in a |
---|
4 | PGA_DATATYPE_CHARACTER string. |
---|
5 | .SH INPUT PARAMETERS |
---|
6 | .PD 0 |
---|
7 | .TP |
---|
8 | ctx |
---|
9 | - context variable |
---|
10 | .PD 0 |
---|
11 | .TP |
---|
12 | p |
---|
13 | - string index |
---|
14 | .PD 0 |
---|
15 | .TP |
---|
16 | pop |
---|
17 | - symbolic constant of the population the string is in |
---|
18 | .PD 0 |
---|
19 | .TP |
---|
20 | i |
---|
21 | - allele index |
---|
22 | .PD 0 |
---|
23 | .TP |
---|
24 | val |
---|
25 | - character value to set the allele to |
---|
26 | .PD 1 |
---|
27 | .SH OUTPUT PARAMETERS |
---|
28 | .PD 0 |
---|
29 | .TP |
---|
30 | side |
---|
31 | -effect. |
---|
32 | .PD 1 |
---|
33 | .SH SYNOPSIS |
---|
34 | .nf |
---|
35 | #include "pgapack.h" |
---|
36 | void PGASetCharacterAllele(ctx, p, pop, i, value) |
---|
37 | PGAContext *ctx |
---|
38 | int p |
---|
39 | int pop |
---|
40 | int i |
---|
41 | char value |
---|
42 | .fi |
---|
43 | .SH LOCATION |
---|
44 | char.c |
---|
45 | .SH EXAMPLE |
---|
46 | .nf |
---|
47 | Copies the alleles from member p in PGA_OLDPOP to member q in PGA_NEWPOP. |
---|
48 | Assumes the strings are of the same length. |
---|
49 | |
---|
50 | PGAContext *ctx; |
---|
51 | int p, q, i; |
---|
52 | : |
---|
53 | for (i=PGAGetStringLength(ctx)-1; i>=0; i--) |
---|
54 | PGASetCharacterAllele(ctx, q, PGA_NEWPOP, i, |
---|
55 | PGAGetCharacterAllele(ctx, p, PGA_OLDPOP, i)) |
---|
56 | |
---|
57 | .fi |
---|
Note: See
TracBrowser
for help on using the repository browser.