//二分图检测 public class BipartitionDetection { private Graph G; private boolean[] visited; private int[] colors; private boolean isBipartite = true; public BipartitionDetection(Graph G){ this.G = G; visited = new boolean[G.V()]; colors = new int[G.V()]; for(int i=0;i