JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.graph
Class DirectedGraph

java.lang.Object
  extended bygov.nasa.javaGenes.core.Evolvable
      extended bygov.nasa.javaGenes.graph.Graph
          extended bygov.nasa.javaGenes.graph.DirectedGraph
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class DirectedGraph
extends Graph

See Also:
Serialized Form

Nested Class Summary
protected  class DirectedGraph.SecondVertex
          this predicate decides if a vertex is acceptable as a second vertex when adding an edge during graph construction
 
Nested classes inherited from class gov.nasa.javaGenes.graph.Graph
Graph.TrailKey
 
Field Summary
 
Fields inherited from class gov.nasa.javaGenes.graph.Graph
edges, nodeTypePairsShortestTrailCounts, vertices
 
Fields inherited from class gov.nasa.javaGenes.core.Evolvable
childMakersUsed
 
Constructor Summary
DirectedGraph()
           
 
Method Summary
 java.lang.Object clone()
          copy the graph and make copies of all edges and vertices
 DirectedGraph deepCopyDirectedGraph()
          copy the graph and make copies of all edges and vertices
 DirectedEdge getDirectedEdge(int index)
           
 DirectedVertex getDirectedVertex(int index)
           
 DirectedVertex getRandomDirectedVertex(Predicate predicate)
           
 boolean growDirectedEdge(DirectedEdge edge)
          add edge creating an undirected cycle
 boolean growDirectedVertex(DirectedVertex acceptsOutput, DirectedEdge edge)
          attached edge and acceptsOutput and attach them to a random vertex that will accept an input edge
 
Methods inherited from class gov.nasa.javaGenes.graph.Graph
add, add, add, canMate, changed, deepCopyGraph, delete, distanceFrom, executeOnEdges, executeOnVertices, getConnectedSubgraph, getConnectionTable, getEdge, getEdgeIterator, getEdgesSize, getEquivalent, getEquivalent, getExtendedVertexTypesCounter, getNodeTypePairsShortestTrailCounts, getNumberOfCycles, getRandomEdge, getRandomEdge, getRandomVertex, getRandomVertex, getSize, getStringKey, getTrailBetween, getVertex, getVertexAndTrailIterator, getVertexIterator, getVerticesSize, hasVertexPairCloserThan, isConnected, isLegal, numberVertices, numberVerticesReverse, remove, remove, removeLastNVertices, replaceEdge, replaceVertex, setAllMarks, setEdgeMarks, setVertexMarks, shallowClone, toString
 
Methods inherited from class gov.nasa.javaGenes.core.Evolvable
addChildMakers, copyForEvolution, getChildMakersUsed, getSmallest, prepareForEvaluator, stateSave
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectedGraph

public DirectedGraph()
Method Detail

deepCopyDirectedGraph

public DirectedGraph deepCopyDirectedGraph()
copy the graph and make copies of all edges and vertices


clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
copy the graph and make copies of all edges and vertices

Overrides:
clone in class Graph
Throws:
java.lang.CloneNotSupportedException

getDirectedVertex

public DirectedVertex getDirectedVertex(int index)

getDirectedEdge

public DirectedEdge getDirectedEdge(int index)

growDirectedVertex

public boolean growDirectedVertex(DirectedVertex acceptsOutput,
                                  DirectedEdge edge)
attached edge and acceptsOutput and attach them to a random vertex that will accept an input edge


growDirectedEdge

public boolean growDirectedEdge(DirectedEdge edge)
add edge creating an undirected cycle


getRandomDirectedVertex

public DirectedVertex getRandomDirectedVertex(Predicate predicate)

JavaGenes, NASA Ames. Written largely by Al Globus