1 10 package org.jgap; 11 12 import java.io.Serializable ; 13 14 29 public interface Gene 30 extends Comparable , Serializable { 31 32 final static String CVS_REVISION = "$Revision: 1.23 $"; 33 34 38 final static String PERSISTENT_FIELD_DELIMITER = ":"; 39 40 60 Gene newGene(); 61 62 70 71 void setAllele(Object a_newValue); 72 73 81 Object getAllele(); 82 83 98 99 String getPersistentRepresentation() 100 throws UnsupportedOperationException ; 101 102 120 121 void setValueFromPersistentRepresentation(String a_representation) 122 throws UnsupportedOperationException , UnsupportedRepresentationException; 123 124 136 void setToRandomValue(RandomGenerator a_numberGenerator); 137 138 142 void cleanup(); 143 144 149 String toString(); 150 151 157 158 int size(); 159 160 169 void applyMutation(int index, double a_percentage); 170 171 183 void setApplicationData(Object a_newData); 184 185 197 Object getApplicationData(); 198 199 209 210 void setCompareApplicationData(boolean a_doCompare); 211 212 218 boolean isCompareApplicationData(); 219 220 226 public double getEnergy(); 227 228 235 void setEnergy(double a_energy); 236 237 245 void setConstraintChecker( 246 final IGeneConstraintChecker a_constraintChecker); 247 248 254 Configuration getConfiguration(); 255 } 256 | Popular Tags |