##
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 *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.

**Method Summary** |

` boolean` |
**isBipartite**()
A *bipartite graph* is an undirected graph G = (V, E) in
which V can be partitioned into two sets V_{1} and
V_{2} such that (u, v) ∈ E implies that either
(u ∈ V_{1} and v ∈ V_{2}) or
(u ∈ V_{2} and v ∈ V_{1}). |

` 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` |

###
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 V_{1} and
V_{2} such that (u, v) ∈ E implies that either
(u ∈ V_{1} and v ∈ V_{2}) or
(u ∈ V_{2} and v ∈ V_{1}). That is, all edges
go between the two sets V_{1} and V_{2}.

###
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