1 10 package org.jgap.gp.terminal; 11 12 import org.jgap.*; 13 import org.jgap.gp.*; 14 import org.jgap.gp.impl.*; 15 16 22 public class False 23 extends MathCommand implements IMutateable { 24 25 private final static String CVS_REVISION = "$Revision: 1.6 $"; 26 27 public False(final GPConfiguration a_conf) 28 throws InvalidConfigurationException { 29 super(a_conf, 0, CommandGene.BooleanClass); 30 } 31 32 public CommandGene applyMutation(int index, double a_percentage) 33 throws InvalidConfigurationException { 34 CommandGene mutant = new True(getGPConfiguration()); 35 return mutant; 36 } 37 38 public String toString() { 39 return "false"; 40 } 41 42 48 public String getName() { 49 return "Boolean value false"; 50 } 51 52 public boolean execute_boolean(ProgramChromosome c, int n, Object [] args) { 53 return true; 54 } 55 56 public Class getChildType(IGPProgram a_ind, int a_index) { 57 return null; 58 } 59 } 60 | Popular Tags |