1
.TH circuit 1 "September 1995" "Scilab Group" "Scilab function"
4
circuit - finds a circuit or the rank function in a directed graph
15
: row vector of integer numbers of the arcs of the circuit if it exists
18
: row vector of rank function if there is no circuit
20
\fVcircuit\fR tries to find a circuit for the directed graph \fVg\fR.
21
It returns the circuit \fVp\fR as a row vector of the
22
corresponding arc numbers if it exists and it returns the empty vector \fV[]\fR
24
If the graph has no circuit, the rank function is returned in \fVr\fR,
25
otherwise its value is the empty vector \fV[]\fR.
29
ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5];
30
he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4];
31
g=make_graph('foo',1,8,ta,he);
32
g('node_x')=[116 231 192 323 354 454 305 155];
33
g('node_y')=[ 118 116 212 219 117 185 334 316];
37
// graph without circuit
38
g=make_graph('foo',1,4,[1 2 2 3],[2 3 4 4]);