retrait des fonctions d'accès au graphe pour accès direct à l'implem
Cette révision appartient à :
@@ -32,12 +32,12 @@ def export(graphe, oriente, fn, marques=None, distances=None, parents=None) :
|
|||||||
print(str(noeud) + '[label="' + label + '"];', file = f)
|
print(str(noeud) + '[label="' + label + '"];', file = f)
|
||||||
for origine in range(0, taille(graphe)) : # énumérationd des arcs
|
for origine in range(0, taille(graphe)) : # énumérationd des arcs
|
||||||
for arrivee in range(0, taille(graphe)) :
|
for arrivee in range(0, taille(graphe)) :
|
||||||
if (oriente or origine < arrivee) and arc(graphe, origine, arrivee) :
|
if (oriente or origine < arrivee) and graphe[origine][arrivee] is not None :
|
||||||
if parents != None and parents[arrivee] == origine or not oriente and parents[origine] == arrivee :
|
if parents != None and parents[arrivee] == origine or not oriente and parents[origine] == arrivee :
|
||||||
style = ", penwidth=2, color=red"
|
style = ", penwidth=2, color=red"
|
||||||
else :
|
else :
|
||||||
style = ""
|
style = ""
|
||||||
print(str(origine) + lien + str(arrivee) + '[label="' + str(poids(graphe, origine, arrivee)) + '"' + style + "];", file=f)
|
print(str(origine) + lien + str(arrivee) + '[label="' + str(graphe[origine][arrivee]) + '"' + style + "];", file=f)
|
||||||
print("}", file=f)
|
print("}", file=f)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|||||||
Référencer dans un nouveau ticket
Bloquer un utilisateur