pub fn is_bipartite_undirected<G, N, VM>(g: G, start: N) -> bool
where G: GraphRef<NodeId = N, NodeId = N> + Visitable<Map = VM> + IntoNeighbors, N: Copy + PartialEq + Debug, VM: VisitMap<N>,
Expand description

Return true if the graph is bipartite. A graph is bipartite if its nodes can be divided into two disjoint and indepedent sets U and V such that every edge connects U to one in V. This algorithm implements 2-coloring algorithm based on the BFS algorithm.

Always treats the input graph as if undirected.