int main(void) { cree_graphe_non_oriente_non_value("testGraphe.data", 250, 250); graphe g = fich2Graf("testGraphe.data"); printf("\nPARCOURS PROFONDEUR\n"); parcours_profondeur(g); printf("\nPARCOURS LARGEUR\n"); pLargeur(g); /* printf("bicolore ? %d\n",bicolore(g)); */ return 0; }
t_ch_int *connex_of(t_graphe *graphe, char *sommet, int **status, int *names) { t_graphe *res; int *visite; t_ch_ch_int *ttmp; t_ch_int *conx;; conx = xmalloc(sizeof(*conx)); visite = get_visite(graphe->taille); res = parcours_profondeur(graphe, sommet); for (ttmp = res->graphe; ttmp != NULL; ttmp = ttmp->next) { (*status)[get_index(ttmp->number, names, graphe->taille)] = 1; visite[get_index(ttmp->number, names, graphe->taille)] = 1; } effacer(res); conx = tab2ch(visite, names, graphe->taille); return (conx); }