public GrafoM(Grafoc g) { this.grafo = g; int n = grafo.numeroVertices; d = new int[n]; t = new int[n]; antecessor = new int[n]; saida = ""; }
public bool isConexo() { Grafoc G = new Grafoc(NumeroV); GrafoM solucao = new GrafoM(G); solucao.buscaProfundidade(); if (solucao.componentes == 1) return true; else return false; }