List selected vector elements | SLSTxx/DLSTxx/ILSTxx/CLSTxx/ZLSTxx |
Name SLSTxx/DLSTxx/ILSTxx/CLSTxx/ZLSTxx
List selected vector elements
Purpose Given a real, integer, or complex vector x of length n, these subprograms search sequentially through the vector and fill an array with a list of the indices i for which the elements xi satisfy a specified relationship to a given scalar a.
The last two characters of the subprogram name specify the relationship of interest between the elements of the vector and the scalar. For real and integer subprograms, these characters, represented by “xx” in the prototype Fortran statements, and the corresponding list contents can be:
xx | List contents |
EQ | {i : xi = a} |
GE | {i : xi ≥ a} |
GT | {i : xi > a} |
LE | {i : xi ≤ a} |
LT | {i : xi < a} |
NE | {i : xi ≠ a} |
|
|
For complex subprograms, these characters and corresponding list contents are:
xx | List contents |
EQ | {i : xi = a} |
NE | {i : xi ≠ a} |
|
|
The vector can be stored in a
Usage | VECLIB: |
|
| INTEGER*4 | n, incx, nindx, indx(n) |
| REAL*4 | a, x(lenx) |
| CALL SLSTxx(n, x, incx, a, nindx, indx) | |
| INTEGER*4 | n, incx, nindx, indx(n) |
| REAL*8 | a, x(lenx) |
| CALL DLSTxx(n, x, incx, a, nindx, indx) | |
| INTEGER*4 | n, incx, nindx, indx(n), a, x(lenx) |
CALL ILSTxx(n, x, incx, a, nindx, indx)
Chapter 2 Basic Vector Operations 99