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

« back to all changes in this revision

Viewing changes to man/elementary/sp2adj.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
sp2adj            Scilab Group            Scilab Function            sp2adj
 
2
NAME
 
3
   sp2adj   - converts sparse matrix into adjacency form 
 
4
  
 
5
CALLING SEQUENCE
 
6
   [xadj,adjncy,anz]= sp2adj(A)
 
7
  
 
8
PARAMETERS
 
9
 A       :  real or complex sparse matrix (nz non-zero entries)
 
10
         
 
11
 xadj    :  integer vector of length (n+1).
 
12
         
 
13
 adjncy  :  integer vector of length nz containing the row indices     for
 
14
         the corresponding elements in anz
 
15
         
 
16
 anz     :  column vector of length nz, containing the non-zero    
 
17
         elements of A
 
18
         
 
19
DESCRIPTION
 
20
 \fVsp2adj\fR converts a sparse matrix into its adjacency form (utility
 
21
 fonction).
 
22
 \fVA =  n x m\fR sparse matrix. \fVxadj, adjncy, anz\fR = adjacency 
 
23
 representation of \fVA\fR i.e:
 
24
   xadj(j+1)-xadj(j) = number of non zero entries in row j. adjncy = column
 
25
  index of the non zeros entries  in row 1, row 2,..., row n. anz = values
 
26
  of non zero entries in row 1, row 2,..., row n. xadj is a (column) vector
 
27
  of size n+1 and  adjncy is an integer (column) vector of size nz=nnz(A).
 
28
  anz is a real vector of size nz=nnz(A).
 
29
  
 
30
EXAMPLE
 
31
 A = sprand(100,50,.05);
 
32
 [xadj,adjncy,anz]= sp2adj(A);
 
33
 [n,m]=size(A);
 
34
 p = adj2sp(xadj,adjncy,anz,[n,m]);
 
35
 A-p,
 
36
SEE ALSO
 
37
   adj2sp, sparse, spcompack, spget
 
38