|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstructure.AbstractStructure
structure.GraphList
structure.GraphListUndirected
public class GraphListUndirected
A class implementing an undirected, adjacency-list based graph.
GraphList
,
GraphListDirected
,
GraphMatrixUndirected
Constructor Summary | |
---|---|
GraphListUndirected()
Construct an undirected, adjacency-list based graph. |
Method Summary | |
---|---|
void |
addEdge(Object vLabel1,
Object vLabel2,
Object label)
Add an edge between two vertices within the graph. |
int |
edgeCount()
Determine the number of edges in graph. |
Object |
remove(Object label)
Remove a vertex from the graph. |
Object |
removeEdge(Object vLabel1,
Object vLabel2)
Remove possible edge between vertices labeled vLabel1 and vLabel2. |
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 |
---|
equals, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface structure.Structure |
---|
elements, values |
Constructor Detail |
---|
public GraphListUndirected()
Method Detail |
---|
public void addEdge(Object vLabel1, Object vLabel2, Object label)
addEdge
in interface Graph
addEdge
in class GraphList
vLabel1
- One vertex.vLabel2
- Another vertex.label
- Label associated with the edge.public Object remove(Object label)
remove
in interface Graph
remove
in interface Structure
remove
in class GraphList
label
- The label of the vertex within the graph.
public Object removeEdge(Object vLabel1, Object vLabel2)
removeEdge
in interface Graph
removeEdge
in class GraphList
vLabel1
- One vertex.vLabel2
- Another vertex.
public int edgeCount()
edgeCount
in interface Graph
edgeCount
in class GraphList
public String toString()
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |