is_bipartite

Function is_bipartite 

Source
pub fn is_bipartite<N, E, Ix>(graph: &Graph<N, E, Ix>) -> BipartiteResult<N>
where N: Node + Debug, E: EdgeWeight, Ix: IndexType,
Expand description

Checks if a graph is bipartite and returns the coloring if it is

A graph is bipartite if its vertices can be divided into two disjoint sets such that no two vertices within the same set are adjacent.

§Arguments

  • graph - The graph to check

§Returns

  • A BipartiteResult indicating if the graph is bipartite and the coloring