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)
|
||||
for origine in range(0, taille(graphe)) : # énumérationd des arcs
|
||||
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 :
|
||||
style = ", penwidth=2, color=red"
|
||||
else :
|
||||
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)
|
||||
f.close()
|
||||
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur