1
sp2adj Scilab Group Scilab Function sp2adj
3
sp2adj - converts sparse matrix into adjacency form
6
[xadj,adjncy,anz]= sp2adj(A)
9
A : real or complex sparse matrix (nz non-zero entries)
11
xadj : integer vector of length (n+1).
13
adjncy : integer vector of length nz containing the row indices for
14
the corresponding elements in anz
16
anz : column vector of length nz, containing the non-zero
20
\fVsp2adj\fR converts a sparse matrix into its adjacency form (utility
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).
31
A = sprand(100,50,.05);
32
[xadj,adjncy,anz]= sp2adj(A);
34
p = adj2sp(xadj,adjncy,anz,[n,m]);
37
adj2sp, sparse, spcompack, spget