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

« back to all changes in this revision

Viewing changes to man/metanet/graph_simp.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 graph_simp 1 "September 1996" "Scilab Group" "Scilab function"
 
2
.so ../sci.an
 
3
.SH NAME
 
4
graph_simp - converts a graph to a simple undirected graph
 
5
.SH CALLING SEQUENCE
 
6
.nf
 
7
g1 = graph_simp(g)
 
8
.fi
 
9
.SH PARAMETERS
 
10
.TP 2
 
11
g
 
12
: graph list of the old graph
 
13
.TP 3
 
14
g1
 
15
: graph list of the new graph 
 
16
.SH DESCRIPTION
 
17
\fVgraph_simp\fR returns the simple undirected graph \fVg1\fR corresponding to 
 
18
multigraph \fVg\fR. It deletes loops in \fVg\fR, replaces directed edges 
 
19
with undirected edges and replaces multiple edges with single edges.
 
20
.SH EXAMPLE
 
21
.nf
 
22
ta=[1 1  1 2 2 2 3 4 4 4 5 5 6 7 7 8 8 9 9 10 10 10 10 10 11 12 12 13 13 13 14 15 16 16 17 17];
 
23
he=[1 2 10 3 5 7 4 2 9 9 4 6 6 8 2 6 9 7 4  7 11 13 13 15 12 11 13 9 10 14 11 16 1 17 14 15];
 
24
g=make_graph('foo',1,17,ta,he);
 
25
g('node_x')=[283 163  63  98 164 162 273 235 267 384 504 493 409 573 601 627 642];
 
26
g('node_y')=[ 59 133 223 311 227 299 221 288 384 141 209 299 398 383 187 121 301];
 
27
show_graph(g);
 
28
g1=graph_simp(g);
 
29
show_graph(g1,'new');
 
30
.fi