Bonjour, est ce quelqu'un sait faire l'implémentation de l'algorithme de DINIC en C svp?
Je dois construire le graphe d'ecart, trouver le plus court chemin en nombre d'arcs , trouver l'arc avec la capacité minimale et mettre à jour le graphe et le graphe d'écart.
JE suis parvenue à créer cette structure mais je sais pas comment l'utiliser.
voila le fichier.h
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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 #if ! defined (DINIC_H) #defineDINIC_H 1 /* IMPLANTATION */ struct maillon_arc { int cap; int flow; int ecart; struct maillon_arc* next; }; struct struc_sommet { int nbsucc; struct maillon_arc* tete; }; struct struct_reseau { int nbsommet; int nbarcs; int source; int puit; struct_sommet* sommet }; /* PROTOTYPES DES FONCTIONS (TYPE ABSTRAIT)*/ extern void init_struct_reseau (); extern void clear_struct_reseau (); extern void buildGRAPH(); extern void buildRG(); extern void shortestPath(); extern void minCap(); extern void updateFlowInNet(); extern void updateFlowInRG(); #endif
Partager