SGTHRZ/DGTHRZ/IGTHRZ/CGTHRZ/ZGTHRZ | Gather and zero sparse vector |
Name SGTHRZ/DGTHRZ/IGTHRZ/CGTHRZ/ZGTHRZ
Gather and zero sparse vector
Purpose Given a real, integer, or complex dense vector y stored in full storage form and a set of indices of interesting elements of y, these subprograms gather those elements into a sparse vector x stored in compact form via the set of indices and then reset those elements of y to zero.
More precisely, let {k1, k2, ..., km} be the indices of the interesting elements. If x is represented by arrays x and indx such that indx(i) = ki and x(i) = xki, then these subprograms simultaneously perform the operations
xi = yki | i = 1, 2, …, m | |
|
| |
yki | = 0 |
|
If all nonzero elements of y are listed in indx, then these subprograms simultaneously perform the vector operations
x ← y ← y 0
Usage | VECLIB: |
|
| INTEGER*4 | m, indx(m) |
| REAL*4 | y(n), x(m) |
| CALL SGTHRZ(m, y, x, indx) | |
| INTEGER*4 | m, indx(m) |
| REAL*8 | y(n), x(m) |
| CALL DGTHRZ(m, y, x, indx) | |
| INTEGER*4 | m, indx(m), y(n), x(m) |
| CALL IGTHRZ(m, y, x, indx) | |
| INTEGER*4 | m, indx(m) |
| COMPLEX*8 | y(n), x(m) |
| CALL CGTHRZ(m, y, x, indx) | |
| INTEGER*4 | m, indx(m) |
| COMPLEX*16 | y(n), x(m) |
CALL ZGTHRZ(m, y, x, indx)
VECLIB8:
96HP MLIB User’s Guide