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

Chapter 2 Basic Vector Operations 53
Search vector for element ISSVxx/IDSVxx/IISVxx/ICSVxx/IZSVxx
Name ISSVxx/IDSVxx/IISVxx/ICSVxx/IZSVxx
Search vector for element
Purpose Given a real, integer, or complex vector x of length n, these subprograms search
sequentially through the vector for the first element x
i
that satisfies a specified
relationship to a given scalar a and return the index i of that element.
The last two characters of the subprogram name specify the relationship of
interest between the element of the vector and the scalar. For real and integer
subprograms, these characters, represented by “xx” in the prototype Fortran
statements, and the corresponding function values can be:
For complex subprograms, these characters and corresponding function values
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 i, ISSVxx, n, incx
REAL*4 a, x(lenx)
i = ISSVxx(n, x, incx, a)
INTEGER*4 i, IDSVxx, n, incx
REAL*8 a, x(lenx)
i = IDSVxx(n, x, incx, a)
xx Function value
EQ
min{i : x
i
= a}
GE
min{i : x
i
a}
GT
min{i : x
i
> a}
LE
min{i : x
i
a}
LT
min{i : x
i
< a}
NE
min{i : x
i
a}
xx Function value
EQ
min{i : x
i
= a}
NE
min{i : x
i
a}