|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
Specifies common methods for subgraphs of a graph. A subgraph is a subset of vertices and/or edges of another graph, which is called the underlying graph.
| Method Summary | |
boolean |
contains(Edge e)
Returns true if and only if this subgraph contains a given edge. |
boolean |
contains(Vertex v)
Checks if this object contains the argument Vertex (which is supposed to be present in the underlying graph) |
int |
numEdges()
Returns the number of edges in this subgraph |
int |
numVertices()
Returns the number of vertices in this subgraph |
Graph |
underlying()
Returns the underlying graph. |
| Method Detail |
public Graph underlying()
public boolean contains(Vertex v)
v - a vertex in the underlying graphpublic boolean contains(Edge e)
e - an edge in the underlying graphpublic int numVertices()
public int numEdges()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||