JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class CyclesSimilarity

java.lang.Object
  extended bygov.nasa.javaGenes.core.FitnessFunction
      extended bygov.nasa.javaGenes.graph.CyclesSimilarity
All Implemented Interfaces:
java.io.Serializable

public class CyclesSimilarity
extends FitnessFunction

fitness function that compares the number of cycles in an individual with the number of cycles in a target using the Tanimoto coefficient.

See Also:
Tanimoto, Graph, Serialized Form

Field Summary
protected  Graph target
          the target graph against which Individuals will be measured
 
Fields inherited from class gov.nasa.javaGenes.core.FitnessFunction
name
 
Constructor Summary
CyclesSimilarity(Graph graph)
           
 
Method Summary
 Fitness evaluateFitness(Evolvable evolvable)
           
 void makeFiles()
          create a mol file of the target.
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.core.FitnessFunction
bestDouble, getFunction, getName, getNameArray, isNewFunction, numberOfObjectives, report, setName, worstDouble
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

target

protected Graph target
the target graph against which Individuals will be measured

Constructor Detail

CyclesSimilarity

public CyclesSimilarity(Graph graph)
Parameters:
graph - the target
Method Detail

evaluateFitness

public Fitness evaluateFitness(Evolvable evolvable)
Specified by:
evaluateFitness in class FitnessFunction
Returns:
0 best fitness, 1 worst fitness

toString

public java.lang.String toString()

makeFiles

public void makeFiles()
create a mol file of the target. Only works for molecules and we really shouldn't create a file here. Should be done in some sort of reporter.

Overrides:
makeFiles in class FitnessFunction

JavaGenes, NASA Ames. Written largely by Al Globus