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

« back to all changes in this revision

Viewing changes to man/metanet/chain_struct.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 chain_struct 1 "September 1996" "Scilab Group" "Scilab function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
chain_struct - chained structure from adjacency lists of a graph
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
[fe,che,fn,chn] = chain_struct(g)
 
8
[fe,che,fn,chn] = chain_struct(lp,la,ls)
 
9
.fi
 
10
.SH PARAMETERS
 
11
.TP 2
 
12
g
 
13
: graph list
 
14
.TP 3
 
15
lp
 
16
: row vector, pointer array of the adjacency lists description of the graph 
 
17
(its size is the number of nodes of the graph + 1) 
 
18
.TP 3
 
19
la
 
20
: row vector, arc array of the adjacency lists description of the graph 
 
21
(its size is the number of edges of the graph) 
 
22
.TP 3
 
23
ls
 
24
: row vector, node array of the adjacency lists description of the graph 
 
25
(its size is the number of edges of the graph) 
 
26
.TP 3
 
27
fe
 
28
: row vector of the numbers of the first edges starting from nodes
 
29
(its size is the number of nodes of the graph)
 
30
.TP 4
 
31
che
 
32
: row vector of the numbers of the chained edges 
 
33
(its size is the number of edges of the graph)
 
34
.TP 3
 
35
fn
 
36
: row vector of the numbers of the first nodes reached by the edges of 
 
37
\fVfe\fR (its size is the number of nodes of the graph)
 
38
.TP 4
 
39
chn
 
40
: row vector of the nodes reached by the edges of \fVche\fR
 
41
.SH DESCRIPTION
 
42
\fVchain_struct\fR computes the row vectors of the edge chained structure 
 
43
description of the graph \fVg\fR.
 
44
It is also possible to give directly \fVchain_struct\fR the adjacency lists of
 
45
the graph. This is more efficient if the adjacency lists are already
 
46
available since \fVchain_struct\fR uses them to make computations.
 
47
 
 
48
The vectors \fVfe\fR, \fVche\fR, \fVfn\fR and \fVchn\fR describe the
 
49
chained structure in the following way:
 
50
 
 
51
\fVfe(i))\fR is the number of the first edge starting from node i
 
52
 
 
53
\fVche(fe(i))\fR is the number of the second edge starting from
 
54
node i, \fVche(che(fe(i)))\fR is the number of the third edge starting from
 
55
node i and so on until the value is 0
 
56
 
 
57
\fVfn(i)\fR is the number of the first node reached from node i
 
58
 
 
59
\fVch(i)\fR is the number of the node reached by edge \fVche(i)\fR.
 
60
.SH EXAMPLE
 
61
.nf
 
62
ta=[1 1 2 3 5 4 6 7 7 3 3 8 8 5];
 
63
he=[2 3 5 4 6 6 7 4 3 2 8 1 7 4];
 
64
g=make_graph('foo',1,8,ta,he);
 
65
g('node_x')=[116 231 192 323 354 454 305 155];
 
66
g('node_y')=[118 116 212 219 117 185 334 316];
 
67
show_graph(g);
 
68
[fe,che,fn,chn] = chain_struct(g)
 
69
.fi
 
70
.SH SEE ALSO
 
71
adj_lists, graph_2_mat