Minimum value and location

F_SMIN_VAL/F_DMIN_VAL

Name F_SMIN_VAL/F_DMIN_VAL

Minimum value and location

Purpose F_xMIN_VAL returns the smallest component of a real vector x and also the smallest offset or index k.

k, xksuch that k= arg0 i < nmax( xi)

When the value of the n argument is less than or equal to zero, F_xMIN_VAL initializes the output scalars k to the largest invalid index (zero) and r to zero. When the value of the n argument is less than or equal to zero, F_xMIN_VAL initializes the output scalars k to the largest invalid index (zero) and r to zero.

The routine F_xMIN_VAL operates strictly on real vectors and is not defined for complex vectors.

Usage

VECLIB:

 

 

INTEGER*4

INCX, K, N

 

REAL*4

R

 

REAL*4

X( * )

 

SUBROUTINE F_SMIN_VAL (N, X, INCX, K, R)

 

INTEGER*4

INCX, K, N

 

REAL*8

R

 

REAL*8

X( * )

 

SUBROUTINE F_DMIN_VAL (N, X, INCX, K, R)

 

VECLIB8:

 

 

INTEGER*8

INCX, K, N

 

REAL*4

R

 

REAL*4

X( * )

 

SUBROUTINE F_SMIN_VAL (N, X, INCX, K, R)

 

INTEGER*8

INCX, K, N

 

REAL*8

R

 

REAL*8

X( * )

 

SUBROUTINE F_DMIN_VAL (N, X, INCX, K, R)

Input

N

Number of elements of vector x.

 

X

REAL array, minimum length (N - 1) x incx + 1.

 

INCX

Increment for the array x. A vector x having component

 

 

xi, i = 1,..., n, is stored in an array X() with increment

 

 

argument incx. If incx > 0 then xi is stored in

Chapter 2 Basic Vector Operations 183