01: /*
02: * This file is part of JGAP.
03: *
04: * JGAP offers a dual license model containing the LGPL as well as the MPL.
05: *
06: * For licensing information please see the file license.txt included with JGAP
07: * or have a look at the top of class org.jgap.Chromosome which representatively
08: * includes the JGAP license policy applicable for any file delivered with JGAP.
09: */
10: package examples.gp.anttrail;
11:
12: import org.jgap.*;
13: import org.jgap.gp.*;
14: import org.jgap.gp.impl.*;
15:
16: /**
17: * Abstract base class for GP-commands related to the ant trail problem.
18: *
19: * @author Klaus Meffert
20: * @since 3.01
21: */
22: public abstract class AntCommand extends CommandGene {
23: /** String containing the CVS revision. Read out via reflection!*/
24: private static final String CVS_REVISION = "$Revision: 1.3 $";
25:
26: public AntCommand(final GPConfiguration a_conf)
27: throws InvalidConfigurationException {
28: super (a_conf, 0, CommandGene.VoidClass);
29: }
30:
31: public AntCommand(final GPConfiguration a_conf, int a_arity,
32: Class a_type) throws InvalidConfigurationException {
33: super (a_conf, a_arity, a_type);
34: }
35:
36: public AntMap getMap(ProgramChromosome a_chrom) {
37: return (AntMap) a_chrom.getIndividual().getApplicationData();
38: }
39: }
|