JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class VertexPairsDistanceSimilarity

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

public class VertexPairsDistanceSimilarity
extends FitnessFunction

fitness is the distance from a target graph. All-pairs-shortest-path comparison using the Tanimoto coefficient is used.

See Also:
apsp, Tanimoto, Graph.distanceFrom(gov.nasa.javaGenes.core.Evolvable), Serialized Form

Field Summary
protected  Graph target
          target graph
 
Fields inherited from class gov.nasa.javaGenes.core.FitnessFunction
name
 
Constructor Summary
VertexPairsDistanceSimilarity()
          set the target to a test molecule
VertexPairsDistanceSimilarity(Graph graph)
           
 
Method Summary
 Fitness evaluateFitness(Evolvable evolvable)
           
 void makeFiles()
          write out the target as file target.mol
 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
target graph

Constructor Detail

VertexPairsDistanceSimilarity

public VertexPairsDistanceSimilarity(Graph graph)
Parameters:
graph - the target

VertexPairsDistanceSimilarity

public VertexPairsDistanceSimilarity()
set the target to a test molecule

Method Detail

evaluateFitness

public Fitness evaluateFitness(Evolvable evolvable)
Specified by:
evaluateFitness in class FitnessFunction
Parameters:
evolvable - must be a Graph
Returns:
0 for closest, 1 for farthest from target.
See Also:
Graph

toString

public java.lang.String toString()

makeFiles

public void makeFiles()
write out the target as file target.mol

Overrides:
makeFiles in class FitnessFunction

JavaGenes, NASA Ames. Written largely by Al Globus