This repository has been archived by the owner on Jun 27, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.c
72 lines (58 loc) · 1.75 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#include <stdio.h>
#include <stdlib.h>
#include "sources/graphe_matrice.c"
#include "sources/graphe_liste.c"
#include "sources/tp2.c"
#include "sources/tp3.c"
#define SIZE 4
int main(int argc, char** argv) {
LISTE g;
reservation_en_memoireL(6, &g);
ajouter_arete(&g, 5, 0);
ajouter_arete(&g, 4, 0);
ajouter_arete(&g, 1, 0);
ajouter_arete(&g, 2, 0);
ajouter_arete(&g, 1, 5);
ajouter_arete(&g, 2, 5);
ajouter_arete(&g, 1, 3);
int m = 5;
// Nouveau graphe
// reservation_en_memoire(SIZE, &m);
// Ajouts d'arcs
// ajouter_arc(&m, 1, 2);
// ajouter_arc(&m, 2, 3);
// Affichage de la matrice
// print_matrice(&m);
// Lancement de la fonction permettant de calculer tous les degres
// calcul_tous_degres(&m, &dplus, &dmoins);
// Affichage des degres
// for (int i = 0; i < SIZE; i++) {
// printf("%d, %d\n", dplus[i], dmoins[i]);
// }
// Copie dans m2
// copie_graphe(&m, &m2);
// print_matrice(&m2);
// ecrire_graphe(&m, "test.txt");
// lire_graphe("test.txt", &m);
// print_matrice(&m);
// TP3 - EX1 : PARCOURS EN PROFONDEUR
// printf("--Parcours en profondeur--\n");
// parcours_en_profondeur(g, m);
// TP3 - EX2 : PARCOURS EN LARGEUR
// printf("--Parcours en largeur--\n");
// parcours_en_largeur(g, m);
// printf("--Affichage brut--\n");
// affichage(&g);
// TP2 - EX1 : BOUTEILLES
// bouteilles* tabB;
// int n;
// n=0;
// tabB= (bouteilles *) malloc(sizeof(bouteilles));
// diviser_quantite(14,0,0,&n,tabB);
// TP2 - EX2 : COURS
// coursMatrice("ex2-matrice.txt");
// coursListe("ex2-liste.txt");
// TP2 - EX2 : WELSH WOWELL
// welsh_wowell_liste(&g);
return EXIT_SUCCESS;
}