NAG Library Manual, Mark 30.3
Interfaces:  FL   CL   CPP   AD 

NAG CL Interface Introduction
Example description

nag_sparse_real_gen_sort (f11zac) Example Program Results

Elements of B
nnz =    15
                       b    brow    bcol
       0      4.0000e+00       3       1
       1     -2.0000e+00       5       2
       2      1.0000e+00       4       4
       3     -2.0000e+00       4       2
       4     -3.0000e+00       5       5
       5      1.0000e+00       1       2
       6      0.0000e+00       1       5
       7      1.0000e+00       3       5
       8     -1.0000e+00       2       4
       9      6.0000e+00       5       5
      10      2.0000e+00       1       1
      11      2.0000e+00       4       2
      12      1.0000e+00       2       3
      13      1.0000e+00       3       3
      14      2.0000e+00       4       5
Elements of C
nnz =    12
                       c    crow    ccol
       0      3.0000e+00       1       5
       1      2.0000e+00       3       4
       2      4.0000e+00       1       1
       3     -2.0000e+00       5       2
       4      1.0000e+00       4       2
       5      2.0000e+00       1       3
       6      2.0000e+00       2       5
       7     -1.0000e+00       2       2
       8      4.0000e+00       5       4
       9      3.0000e+00       4       1
      10      1.0000e+00       2       4
      11     -3.0000e+00       4       5
Summed and reordered elements of A = B + C, along rows first
nnz =   18
                       a    irow    icol
       0      6.0000e+00       1       1
       1      1.0000e+00       1       2
       2      2.0000e+00       1       3
       3      3.0000e+00       1       5
       4     -1.0000e+00       2       2
       5      1.0000e+00       2       3
       6      2.0000e+00       2       5
       7      4.0000e+00       3       1
       8      1.0000e+00       3       3
       9      2.0000e+00       3       4
      10      1.0000e+00       3       5
      11      3.0000e+00       4       1
      12      1.0000e+00       4       2
      13      1.0000e+00       4       4
      14     -1.0000e+00       4       5
      15     -4.0000e+00       5       2
      16      4.0000e+00       5       4
      17      3.0000e+00       5       5
Reordered elements, along columns first
nnz =   18
                       a    irow    icol
       0      6.0000e+00       1       1
       1      4.0000e+00       3       1
       2      3.0000e+00       4       1
       3      1.0000e+00       1       2
       4     -1.0000e+00       2       2
       5      1.0000e+00       4       2
       6     -4.0000e+00       5       2
       7      2.0000e+00       1       3
       8      1.0000e+00       2       3
       9      1.0000e+00       3       3
      10      2.0000e+00       3       4
      11      1.0000e+00       4       4
      12      4.0000e+00       5       4
      13      3.0000e+00       1       5
      14      2.0000e+00       2       5
      15      1.0000e+00       3       5
      16     -1.0000e+00       4       5
      17      3.0000e+00       5       5
Same matrix in CCS format
nnz =   18
                       a  irowix  icolzp
       0      6.0000e+00       1       1
       1      4.0000e+00       3       4
       2      3.0000e+00       4       8
       3      1.0000e+00       1      11
       4     -1.0000e+00       2      14
       5      1.0000e+00       4      19
       6     -4.0000e+00       5
       7      2.0000e+00       1
       8      1.0000e+00       2
       9      1.0000e+00       3
      10      2.0000e+00       3
      11      1.0000e+00       4
      12      4.0000e+00       5
      13      3.0000e+00       1
      14      2.0000e+00       2
      15      1.0000e+00       3
      16     -1.0000e+00       4
      17      3.0000e+00       5
One-norm       1.3000e+01
Converted CCS format back to CS format, result matches original
Transpose of summed and reordered elements, along rows first
nnz =   18
                       a    irow    icol
       0      6.0000e+00       1       1
       1      4.0000e+00       1       3
       2      3.0000e+00       1       4
       3      1.0000e+00       2       1
       4     -1.0000e+00       2       2
       5      1.0000e+00       2       4
       6     -4.0000e+00       2       5
       7      2.0000e+00       3       1
       8      1.0000e+00       3       2
       9      1.0000e+00       3       3
      10      2.0000e+00       4       3
      11      1.0000e+00       4       4
      12      4.0000e+00       4       5
      13      3.0000e+00       5       1
      14      2.0000e+00       5       2
      15      1.0000e+00       5       3
      16     -1.0000e+00       5       4
      17      3.0000e+00       5       5