~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/metanet/mat_2_graph.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
mat_2_graph        Scilab Group        Scilab function          mat_2_graph
2
 
NAME
3
 
   mat_2_graph - graph from node-arc or node-node incidence matrix
4
 
  
5
 
CALLING SEQUENCE
6
 
 g = mat_2_graph(a,directed,[mat])
7
 
PARAMETERS
8
 
 a  : sparse node-arc or node-node incidence matrix
9
 
    
10
 
 directed
11
 
     : integer, 0 (undirected graph) or 1 (directed graph)
12
 
    
13
 
 mat
14
 
     : optional string, 'node-arc' or 'node-node' matrix
15
 
    
16
 
 g  : graph list
17
 
    
18
 
DESCRIPTION
19
 
   mat_2_graph computes the graph g corresponding to the node-arc  or the
20
 
  node-node incidence matrix a. Note that a checking is made to insure that
21
 
  a is a sparse node-arc  or node-node incidence matrix of a directed
22
 
  (directed = 1) or undirected  (directed = 0) graph. If the optional
23
 
  argument mat is omitted or is the string  'node-arc', a must be a
24
 
  node-arc matrix. If mat is the string 'node-node', a must be a node-node
25
 
  matrix.
26
 
  
27
 
EXAMPLE
28
 
 g=load_graph(SCI+'/demos/metanet/colored');
29
 
 show_graph(g);
30
 
 a=graph_2_mat(g);
31
 
 g1=mat_2_graph(a,1);
32
 
 g1('node_x')=g('node_x'); g1('node_y')=g('node_y');
33
 
 show_graph(g1,'new');
34
 
 a=graph_2_mat(g,'node-node');
35
 
 g1=mat_2_graph(a,1,'node-node');
36
 
 g1('node_x')=g('node_x'); g1('node_y')=g('node_y');
37
 
 show_graph(g1,'new');
38
 
SEE ALSO
39
 
   adj_lists, chain_struct, graph_2_mat
40