gov.nasa.javaGenes.graph
Class DirectedGraph
java.lang.Object
gov.nasa.javaGenes.core.Evolvable
gov.nasa.javaGenes.graph.Graph
gov.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 |
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 java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DirectedGraph
public DirectedGraph()
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)