Last change
on this file since 12912 was
6152,
checked in by bfarka, 14 years ago
|
added ecj and custom statistics to communicate with the okb services #1441
|
File size:
1.6 KB
|
Line | |
---|
1 | /* |
---|
2 | Copyright 2006 by Sean Luke |
---|
3 | Licensed under the Academic Free License version 3.0 |
---|
4 | See the file "LICENSE" for more information |
---|
5 | */ |
---|
6 | |
---|
7 | |
---|
8 | package ec.vector; |
---|
9 | import ec.*; |
---|
10 | import ec.util.*; |
---|
11 | |
---|
12 | /* |
---|
13 | * GeneVectorSpecies.java |
---|
14 | * |
---|
15 | * Created: Tue Feb 20 13:26:00 2001 |
---|
16 | * By: Sean Luke |
---|
17 | */ |
---|
18 | |
---|
19 | /** |
---|
20 | * GeneVectorSpecies is a subclass of VectorSpecies with special |
---|
21 | * constraints for GeneVectorIndividuals. |
---|
22 | * |
---|
23 | * <p>At present there is exactly one item stored in GeneVectorSpecies: |
---|
24 | * the prototypical VectorGene that populates the genome array stored in a |
---|
25 | * GeneVectorIndividual. |
---|
26 | * |
---|
27 | * @author Sean Luke |
---|
28 | * @version 1.0 |
---|
29 | |
---|
30 | <p><b>Parameters</b><br> |
---|
31 | <table> |
---|
32 | <tr><td valign=top><tt>gene</tt><br> |
---|
33 | <font size=-1>classname, inherits and != ec.VectorGene</font></td> |
---|
34 | <td valign=top>(the prototypical gene for this kind of individual)</td></tr> |
---|
35 | </table> |
---|
36 | |
---|
37 | <p><b>Parameter bases</b><br> |
---|
38 | <table> |
---|
39 | <tr><td valign=top><i>base</i>.<tt>gene</tt></td> |
---|
40 | <td>The prototypical gene for this kind of individual</td></tr> |
---|
41 | </table> |
---|
42 | |
---|
43 | */ |
---|
44 | |
---|
45 | public class GeneVectorSpecies extends VectorSpecies |
---|
46 | { |
---|
47 | public static final String P_GENE = "gene"; |
---|
48 | public VectorGene genePrototype; |
---|
49 | |
---|
50 | public void setup(final EvolutionState state, final Parameter base) |
---|
51 | { |
---|
52 | Parameter def = defaultBase(); |
---|
53 | |
---|
54 | genePrototype = (VectorGene)(state.parameters.getInstanceForParameterEq( |
---|
55 | base.push(P_GENE),def.push(P_GENE),VectorGene.class)); |
---|
56 | genePrototype.setup(state,base.push(P_GENE)); |
---|
57 | |
---|
58 | // make sure that super.setup is done AFTER we've loaded our gene prototype. |
---|
59 | super.setup(state,base); |
---|
60 | } |
---|
61 | |
---|
62 | } |
---|
63 | |
---|
Note: See
TracBrowser
for help on using the repository browser.