## org.metasyntactic.math Interface UndirectedGraph

All Superinterfaces:
Graph

public interface UndirectedGraph
extends Graph

In an undirected graph G = (V, E), the edge set E consists of unordered pairs of vertices, rather then ordered pairs. ∈ V and uv. 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

### isComplete

`public boolean isComplete()`
A complete graph is an undirected graph in which every pair of vertices is adjacent.

Returns:
`true` If this undirected graph is complete

### isBipartite

`public 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). That is, all edges go between the two sets V1 and V2.

### isConnected

`public boolean isConnected()`
An undirected graph is connected if every pair of vertices is connected by a path.

Returns:
`true` if this undirected graph is connected