Last change
on this file since 9598 was
6152,
checked in by bfarka, 14 years ago
|
added ecj and custom statistics to communicate with the okb services #1441
|
File size:
1.5 KB
|
Rev | Line | |
---|
[6152] | 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.gp; |
---|
| 9 | import ec.*; |
---|
| 10 | |
---|
| 11 | /* |
---|
| 12 | * GPBreedingPipeline.java |
---|
| 13 | * |
---|
| 14 | * Created: Tue Sep 14 19:38:09 1999 |
---|
| 15 | * By: Sean Luke |
---|
| 16 | */ |
---|
| 17 | |
---|
| 18 | /** |
---|
| 19 | * A GPBreedingPipeline is a BreedingPipeline which produces only |
---|
| 20 | * members of some subclass of GPSpecies. This is just a convenience |
---|
| 21 | * superclass for many of the breeding pipelines here; you don't have |
---|
| 22 | * to be a GPBreedingPipeline in order to breed GPSpecies or anything. |
---|
| 23 | * |
---|
| 24 | * @author Sean Luke |
---|
| 25 | * @version 1.0 |
---|
| 26 | */ |
---|
| 27 | |
---|
| 28 | public abstract class GPBreedingPipeline extends BreedingPipeline |
---|
| 29 | { |
---|
| 30 | /** Standard parameter for node-selectors associated with a GPBreedingPipeline */ |
---|
| 31 | public static final String P_NODESELECTOR = "ns"; |
---|
| 32 | |
---|
| 33 | /** Standard parameter for tree fixing */ |
---|
| 34 | public static final String P_TREE = "tree"; |
---|
| 35 | |
---|
| 36 | /** Standard value for an unfixed tree */ |
---|
| 37 | public static final int TREE_UNFIXED = -1; |
---|
| 38 | |
---|
| 39 | |
---|
| 40 | /** Returns true if <i>s</i> is a GPSpecies. */ |
---|
| 41 | public boolean produces(final EvolutionState state, |
---|
| 42 | final Population newpop, |
---|
| 43 | final int subpopulation, |
---|
| 44 | final int thread) |
---|
| 45 | { |
---|
| 46 | if (!super.produces(state,newpop,subpopulation,thread)) return false; |
---|
| 47 | |
---|
| 48 | // we produce individuals which are owned by subclasses of GPSpecies |
---|
| 49 | if (newpop.subpops[subpopulation].species instanceof GPSpecies) |
---|
| 50 | return true; |
---|
| 51 | return false; |
---|
| 52 | } |
---|
| 53 | |
---|
| 54 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.