|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectstructure.AbstractStructure
structure.GraphList
structure.GraphListDirected
public class GraphListDirected
A class implementing a directed, adjacency-list based graph.
GraphList,
GraphListUndirected,
GraphMatrixDirected| Field Summary |
|---|
| Fields inherited from class structure.GraphList |
|---|
dict, directed |
| Constructor Summary | |
|---|---|
GraphListDirected()
Construct a directed, adjacency-list based graph. |
|
| Method Summary | |
|---|---|
void |
addEdge(java.lang.Object vLabel1,
java.lang.Object vLabel2,
java.lang.Object label)
Add an edge between two vertices within the graph. |
int |
edgeCount()
Determine the number of edges in graph. |
java.lang.Object |
remove(java.lang.Object label)
Remove a vertex from the graph. |
java.lang.Object |
removeEdge(java.lang.Object vLabel1,
java.lang.Object vLabel2)
Remove possible edge between vertices labeled vLabel1 and vLabel2. |
java.lang.String |
toString()
Construct a string representation of graph. |
| Methods inherited from class structure.GraphList |
|---|
add, clear, contains, containsEdge, degree, edges, get, getEdge, isDirected, isEmpty, isVisited, isVisitedEdge, iterator, neighbors, reset, size, visit, visitEdge |
| Methods inherited from class structure.AbstractStructure |
|---|
elements, hashCode, values |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface structure.Structure |
|---|
elements, values |
| Constructor Detail |
|---|
public GraphListDirected()
| Method Detail |
|---|
public void addEdge(java.lang.Object vLabel1,
java.lang.Object vLabel2,
java.lang.Object label)
addEdge in interface GraphaddEdge in class GraphListvLabel1 - Source vertex.vLabel2 - Destination vertex.label - Label associated with the edge.public java.lang.Object remove(java.lang.Object label)
remove in interface Graphremove in interface Structureremove in class GraphListlabel - The label of the vertex within the graph.
public java.lang.Object removeEdge(java.lang.Object vLabel1,
java.lang.Object vLabel2)
removeEdge in interface GraphremoveEdge in class GraphListvLabel1 - Source vertex.vLabel2 - Destination vertex.
public int edgeCount()
edgeCount in interface GraphedgeCount in class GraphListpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||