ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.examples.genetic
Class TstGeneticFunction1

java.lang.Object
  extended bycom.ibm.able.beans.AbleGeneticObject
      extended bycom.ibm.able.examples.genetic.TstGeneticFunction1
All Implemented Interfaces:
java.io.Serializable

public class TstGeneticFunction1
extends AbleGeneticObject

This class maximizes the number of on bits (1) in a binary string

See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Fields inherited from class com.ibm.able.beans.AbleGeneticObject
chromosome, chromosomeLength, chromosomeType, crossoverRate, evaluationAgent, fitness, fitnessComputed, member, mutationRate, normalizedFitness, searchAgent, vocabulary
 
Constructor Summary
TstGeneticFunction1()
           
 
Method Summary
 double computeFitness()
          just add up the number of ones in the chromosome
 double getFitness()
          return the fitness value for this member Note: use computeFitness() to do the computation
 
Methods inherited from class com.ibm.able.beans.AbleGeneticObject
binaryToInteger, generateRandomChromosome, getBean, getChromosome, getChromosomeLength, getChromosomeType, getCrossoverRate, getMutationRate, getNormalizedFitness, getOperatorFitness, getRandomChromosome, getVocabulary, initBean, initEvaluationAgent, mutate, mutateChromosome, onePointCrossover, onePointCrossoverAndMutate, registerOperators, removeBean, setChromosome, setCrossoverRate, setEvaluationAgent, setMutationRate, setNormalizedFitness, toString, twoPointCrossover, uniformCrossover
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx

See Also:
Constant Field Values
Constructor Detail

TstGeneticFunction1

public TstGeneticFunction1()
Method Detail

getFitness

public double getFitness()
Description copied from class: AbleGeneticObject
return the fitness value for this member Note: use computeFitness() to do the computation

Overrides:
getFitness in class AbleGeneticObject

computeFitness

public double computeFitness()
just add up the number of ones in the chromosome

Overrides:
computeFitness in class AbleGeneticObject
Returns:
the fitness value for this population member

ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005