File: strong_con_nodes.cat

package info (click to toggle)
scilab 2.4-1
  • links: PTS
  • area: non-free
  • in suites: potato, slink
  • size: 55,196 kB
  • ctags: 38,019
  • sloc: ansic: 231,970; fortran: 148,976; tcl: 7,099; makefile: 4,585; sh: 2,978; csh: 154; cpp: 101; asm: 39; sed: 5
file content (38 lines) | stat: -rw-r--r-- 1,191 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

strong_con_nodes(1)            Scilab function            strong_con_nodes(1)
NAME
  strong_con_nodes - set of nodes of a strong connected component

CALLING SEQUENCE
  ns = strong_con_nodes(i,g)

PARAMETERS

  i : integer, number of the strong connected component

  g : graph list

  ns : row vector, node numbers of the strong connected component

DESCRIPTION
  strong_con_nodes returns the row vector ns of the numbers of the nodes
  which belong to the strong connected component number i.

EXAMPLE
  ta=[1 1 2 2 2 3 4 4 5 6 6 6 7 7 7 8 9 10 12 12 13 13 13 14 15];
  he=[2 6 3 4 5 1 3 5 1 7 10 11 5 8 9 5 8 11 10 11 9 11 15 13 14];
  g=make_graph('foo',1,15,ta,he);
  g('node_x')=[197 191 106 194 296 305 305 418 422 432 552 550 549 416 548];
  g('node_y')=[76 181 276 278 276 83 174 281 177 86 175 90 290 397 399];
  show_graph(g);
  ncomp=strong_con_nodes(3,g);
  n=g('node_number');
  nodecolor=0*ones(1,n); nodecolor(ncomp)=11*ones(ncomp);
  g('node_color')=nodecolor;
  nodediam=20*ones(1,n); nodediam(ncomp)=40*ones(ncomp);
  g('node_diam')=nodediam;
  x_message('Set of nodes of the strong connected component #3');
  show_graph(g);

SEE ALSO
  connex, con_nodes, strong_connex