JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class ExtendedTypeSimilarity

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

public class ExtendedTypeSimilarity
extends FitnessFunction

a fitness function consisting of the Tanimoto distance to a target. Each graph is located in space by the extended types of its vertices.

See Also:
Vertex, Vertex.getExtendedTypeString(), Vertex.getExtendedTypeObject(), Tanimoto, Serialized Form

Field Summary
protected  Graph target
           
 
Fields inherited from class gov.nasa.javaGenes.core.FitnessFunction
name
 
Constructor Summary
ExtendedTypeSimilarity(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
Constructor Detail

ExtendedTypeSimilarity

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

evaluateFitness

public Fitness evaluateFitness(Evolvable evolvable)
Specified by:
evaluateFitness in class FitnessFunction
Returns:
the Tanimoto distance between evolvable and the target. 0 is best, 1 is 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