circuit - trouve un circuit ou la fonction de rang dans un graphe orienté
circuit essaye de trouver un circuit pour le graphe orienté g . Elle renvoie, s'il existe, le circuit p en temps que vecteur ligne des numéros d'arcs correspondants et renvoie le vecteur vide [] sinon. Si le graphe n'a pas de circuit, la fonction de rang est renvoyée dans r , sinon sa valeur est le vecteur vide [] .
// graphe avec circuit ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5]; he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4]; g=make_graph('foo',1,8,ta,he); g('node_x')=[116 231 192 323 354 454 305 155]; g('node_y')=[ 118 116 212 219 117 185 334 316]; show_graph(g); p=circuit(g) show_arcs(p) // graphe sans circuit g=make_graph('foo',1,4,[1 2 2 3],[2 3 4 4]); [p,r]=circuit(g)