~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to man/metanet/circuit.man

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
.TH circuit 1 "September 1995" "Scilab Group" "Scilab function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
circuit - finds a circuit or the rank function in a directed graph
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
[p,r] = circuit(g)
 
8
.fi
 
9
.SH PARAMETERS
 
10
.TP 2
 
11
g
 
12
: graph list
 
13
.TP 2
 
14
p
 
15
: row vector of integer numbers of the arcs of the circuit if it exists
 
16
.TP 2
 
17
r
 
18
: row vector of rank function if there is no circuit
 
19
.SH DESCRIPTION 
 
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
 
23
otherwise.
 
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.
 
26
.SH EXAMPLE
 
27
.nf
 
28
// graph with circuit
 
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];
 
34
show_graph(g);
 
35
p=circuit(g)
 
36
show_arcs(p)
 
37
// graph without circuit
 
38
g=make_graph('foo',1,4,[1 2 2 3],[2 3 4 4]);
 
39
[p,r]=circuit(g)
 
40
.fi