KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > examples > gp > anttrail > AntCommand


1 /*
2  * This file is part of JGAP.
3  *
4  * JGAP offers a dual license model containing the LGPL as well as the MPL.
5  *
6  * For licencing information please see the file license.txt included with JGAP
7  * or have a look at the top of class org.jgap.Chromosome which representatively
8  * includes the JGAP license policy applicable for any file delivered with JGAP.
9  */

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
23     extends CommandGene {
24   /** String containing the CVS revision. Read out via reflection!*/
25   private static final String JavaDoc CVS_REVISION = "$Revision: 1.2 $";
26
27   public AntCommand(final GPConfiguration a_conf)
28       throws InvalidConfigurationException {
29     super(a_conf, 0, CommandGene.VoidClass);
30   }
31
32   public AntCommand(final GPConfiguration a_conf, int a_arity, Class JavaDoc a_type)
33       throws InvalidConfigurationException {
34     super(a_conf, a_arity, a_type);
35   }
36
37   public AntMap getMap(ProgramChromosome a_chrom) {
38     return (AntMap)a_chrom.getIndividual().getApplicationData();
39   }
40 }
41
Popular Tags