These subprograms scatter the elements of sparse vector x,
stored in compressed-vector storage mode, into specified elements of sparse
vector y, stored in full-vector storage mode.
x, y | Subprogram |
Short-precision real | SSCTR |
Long-precision real | DSCTR |
Short-precision complex | CSCTR |
Long-precision complex | ZSCTR |
Fortran | CALL SSCTR | DSCTR | CSCTR | ZSCTR (nz, x, indx, y) |
C and C++ | ssctr | dsctr | csctr | zsctr (nz, x, indx, y); |
PL/I | CALL SSCTR | DSCTR | CSCTR | ZSCTR (nz, x, indx, y); |
Specified as: a one-dimensional array of (at least) length nz, containing fullword integers.
Returned as: a one-dimensional array of (at least) length max(INDX(i)) for i = 1, nz, containing numbers of the data type indicated in Table 57.
The copy is expressed as follows:
where:
See reference [29]. If nz is 0, no copy is performed.
None
nz < 0
This example shows how to use SSCTR to copy a sparse vector x of length 5 into the following vector y, where the elements of array INDX are in ascending order:
Y = (6.0, 2.0, 4.0, 7.0, 6.0, 10.0, -2.0, 8.0, 9.0, 0.0 )
NZ X INDX Y | | | | CALL SSCTR( 5 , X , INDX , Y ) X = (1.0, 2.0, 3.0, 4.0, 5.0) INDX = (1, 3, 4, 7, 10)
Y = (1.0, 2.0, 2.0, 3.0, 6.0, 10.0, 4.0, 8.0, 9.0, 5.0)
This example shows how to use SSCTR to copy a sparse vector x of length 5 into the following vector y, where the elements of array INDX are in random order:
Y = (6.0, 2.0, 4.0, 7.0, 6.0, 10.0, -2.0, 8.0, 9.0, 0.0 )
NZ X INDX Y | | | | CALL SSCTR( 5 , X , INDX , Y ) X = (1.0, 2.0, 3.0, 4.0, 5.0) INDX = (4, 3, 1, 10, 7)
Y = (3.0, 2.0, 2.0, 1.0, 6.0, 10.0, 5.0, 8.0, 9.0, 4.0)
This example shows how to use CSCTR to copy a sparse vector x of length 3 into the following vector y, where the elements of array INDX are in random order:
Y = ((6.0, 5.0), (-2.0, 3.0), (15.0, 4.0), (9.0, 0.0))
NZ X INDX Y | | | | CALL CSCTR( 3 , X , INDX , Y ) X = ((1.0, 2.0), (3.0, 4.0), (5.0, 6.0)) INDX = (4, 1, 3)
Y = ((3.0, 4.0), (-2.0, 3.0), (5.0, 6.0), (1.0, 2.0))