ISCTxx/IDCTxx/IICTxx/ICCTxx/IZCTxx

Count selected vector elements

Name ISCTxx/IDCTxx/IICTxx/ICCTxx/IZCTxx

Count selected vector elements

Purpose Given a real, integer, or complex vector x of length n, these subprograms count the number of elements of the vector that satisfy a specified relationship to a given scalar a.

The last two characters of the subprogram name specify the relation 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 function values can be:

xx

Function value

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 function values are:

xx

Function value

EQ

#{i : xi = a}

NE

#{i : xi a}

 

 

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, ISCTxx, n, incx

 

REAL*4

a, x(lenx)

 

i = ISCTxx(n, x, incx, a)

 

INTEGER*4

i, IDCTxx, n, incx

 

REAL*8

a, x(lenx)

 

i = IDCTxx(n, x, incx, a)

 

INTEGER*4

i, IICTxx, n, incx, a, x(lenx)

i = IICTxx(n, x, incx, a)

46HP MLIB User’s Guide