HP MLIB User's Guide Vol. 1 7th Ed.

Chapter 2 Basic Vector Operations 99
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 x
i
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:
For complex subprograms, these characters and corresponding list contents are:
The vector can be stored in a one-dimensional array or in either a row or a
column of a two-dimensional array.
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)
xx List contents
EQ
{i : x
i
= a}
GE
{i : x
i
a}
GT
{i : x
i
> a}
LE
{i : x
i
a}
LT
{i : x
i
< a}
NE
{i : x
i
a}
xx List contents
EQ
{i : x
i
= a}
NE
{i : x
i
a}