SSCTR/DSCTR/ISCTR/CSCTR/ZSCTR

Scatter sparse vector

Name SSCTR/DSCTR/ISCTR/CSCTR/ZSCTR

Scatter sparse vector

Purpose Given a real, integer, or complex sparse vector x stored in compact form via a set of indices, these subprograms scatter those elements into the corresponding elements of a dense vector y stored in full storage form.

More precisely, let x be a sparse n-vector with m n interesting (usually nonzero) elements, and let {k1, k2, ..., km} be the indices of these elements. If x is represented by arrays x and indx such that indx(i) = ki and x(i) = xki, then

yki = xi, i = 1, 2, …, m.

Usage

VECLIB:

 

 

INTEGER*4

m, indx(m)

 

REAL*4

x(m), y(n)

 

CALL SSCTR(m, x, indx, y)

 

INTEGER*4

m, indx(m)

 

REAL*8

x(m), y(n)

 

CALL DSCTR(m, x, indx, y)

 

INTEGER*4

m, indx(m), x(m), y(n)

 

CALL ISCTR(m, x, indx, y)

 

INTEGER*4

m, indx(m)

 

COMPLEX*8

x(m), y(n)

 

CALL CSCTR(m, x, indx, y)

 

INTEGER*4

m, indx(m)

 

COMPLEX*16

x(m), y(n)

CALL ZSCTR(m, x, indx, y)

VECLIB8:

INTEGER*8

m, indx(m)

REAL*4

x(m), y(n)

CALL SSCTR(m, x, indx, y)

INTEGER*8

m, indx(m)

REAL*8

x(m), y(n)

CALL DSCTR(m, x, indx, y)

INTEGER*8

m, indx(m), x(m), y(n)

CALL ISCTR(m, x, indx, y)

136HP MLIB User’s Guide