|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
In an undirected graph G = (V, E), the edge set E consists of unordered pairs of vertices, rather then ordered pairs. ∈ V and u ≠ v. By convention, we use the notation (u, v) for an edge, rather than the set notation {u, v}, and (u, v) and (v, u) are considered to be the same edge. In an undirected graph, self-loops are forbidden, and so every edge consists of exactly two distinct vertices.
Nested Class Summary |
Nested classes inherited from class org.metasyntactic.math.Graph |
Graph.Edge, Graph.Path |
Method Summary | |
boolean |
isBipartite()
A bipartite graph is an undirected graph G = (V, E) in which V can be partitioned into two sets V1 and V2 such that (u, v) ∈ E implies that either (u ∈ V1 and v ∈ V2) or (u ∈ V2 and v ∈ V1). |
boolean |
isComplete()
A complete graph is an undirected graph in which every pair of vertices is adjacent. |
boolean |
isConnected()
An undirected graph is connected if every pair of vertices is connected by a path. |
Methods inherited from interface org.metasyntactic.math.Graph |
addEdge, addVertex, areAdjacent, containsEdge, containsVertex, degree, getEdges, getVertices, induce, isReachable, isSubgraph |
Method Detail |
public boolean isComplete()
true
If this undirected graph is completepublic boolean isBipartite()
public boolean isConnected()
true
if this undirected graph is connected
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |