examples.energy
Class CoinsEnergy.EnergyGeneConstraintChecker
java.lang.Object
examples.energy.CoinsEnergy.EnergyGeneConstraintChecker
- All Implemented Interfaces:
- java.io.Serializable, IGeneConstraintChecker
- Enclosing class:
- CoinsEnergy
public static class CoinsEnergy.EnergyGeneConstraintChecker
- extends java.lang.Object
- implements IGeneConstraintChecker
Uses to set the energy when a new allele is set
- Since:
- 2.4
- See Also:
- Serialized Form
Method Summary |
boolean |
verify(Gene a_gene,
java.lang.Object a_alleleValue,
IChromosome a_chrom,
int a_geneIndex)
Check if a given allele value is valid for the given gene instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
coinWeights
public static final double[] coinWeights
CoinsEnergy.EnergyGeneConstraintChecker
public CoinsEnergy.EnergyGeneConstraintChecker()
verify
public boolean verify(Gene a_gene,
java.lang.Object a_alleleValue,
IChromosome a_chrom,
int a_geneIndex)
throws java.lang.RuntimeException
- Check if a given allele value is valid for the given gene instance.
- Specified by:
verify
in interface IGeneConstraintChecker
- Parameters:
a_gene
- the gene the given allele is to be validated fora_alleleValue
- the allele value to be validateda_chrom
- not used yeta_geneIndex
- not used yet
- Returns:
- true: allele may be set for gene; false: validity check failed
- Throws:
java.lang.RuntimeException
- if the checker cannot decide whether the given
allele is valid or not- Since:
- 2.4