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

« back to all changes in this revision

Viewing changes to man/metanet/strong_connex.cat

  • 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
strong_connex       Scilab Group       Scilab function        strong_connex
 
2
NAME
 
3
   strong_connex - strong connected components
 
4
  
 
5
CALLING SEQUENCE
 
6
 [nc,ncomp] = strong_connex(g)
 
7
PARAMETERS
 
8
 g  : graph list
 
9
    
 
10
 nc : integer, number of strong connected components
 
11
    
 
12
 ncomp
 
13
     : row vector of strong connected components
 
14
    
 
15
DESCRIPTION
 
16
   strong_connex returns the number nc of strong connected components for
 
17
  the graph g and a row vector ncomp giving the number of the  strong
 
18
  connected component for each node.  For instance, if i is a node number,
 
19
  ncomp[i] is the number of  the strong connected component to which node i
 
20
  belongs.
 
21
  
 
22
EXAMPLE
 
23
 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];
 
24
 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];
 
25
 g=make_graph('foo',1,15,ta,he);
 
26
 g('node_x')=[197 191 106 194 296 305 305 418 422 432 552 550 549 416 548]; 
 
27
 g('node_y')=[76 181 276 278 276 83 174 281 177 86 175 90 290 397 399];
 
28
 show_graph(g);
 
29
 [nc,ncomp]=strong_connex(g);
 
30
 g1=g; g1('node_color')=8+ncomp; g1('node_diam')=10+5*ncomp;
 
31
 x_message('Connected components of the graph');
 
32
 show_graph(g1);
 
33
SEE ALSO
 
34
   connex, con_nodes, strong_con_nodes
 
35