Class DirectedGraph<T extends ExplicitVertexID, U>
java.lang.Object
org.jruby.dirgra.DirectedGraph<T,U>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidallData()Collection<Edge<T, U>> edges()edgesOfType(U type) findOrCreateVertexFor(T data) Find existing vertex and if it is not present create it.findVertexFor(T data) getEdges()voidremoveEdge(Edge<T, U> edge) voidremoveEdge(T source, T destination) voidremoveVertexFor(T data) intsize()toString()Collection<Vertex<T, U>> vertices()
-
Constructor Details
-
DirectedGraph
public DirectedGraph()
-
-
Method Details
-
growEdges
-
getEdges
-
addEdge
-
removeEdge
-
vertices
-
edges
-
edgesOfType
-
allData
-
getInorderData
- Returns:
- data in the order it was added to this graph.
-
addEdge
-
removeEdge
-
findVertexFor
-
findOrCreateVertexFor
-
removeVertexFor
-
size
public int size()- Returns:
- the number of vertices in the graph.
-
toString
-