ismin(3S)

ISMIN, IDMIN - Searches a real vector for the first occurrence of the minimum value

Showing IRIX 6.5.30 (default release). Last changed in IRIX 6.5.19.

NAME
     ISMIN, IDMIN - Searches a real vector for the first occurrence of the
     minimum value

SYNOPSIS
     Single precision

          Fortran:
               integer ISMIN
               integer index
               index = ISMIN (n, x, incx)

          C/C++:
               #include <scsl_blas.h>
               int ISMIN (int n, float *x, int incx);

     Double precision

          Fortran:
               integer IDMIN
               integer index
               index = IDMIN (n, x, incx)

          C/C++:
               #include <scsl_blas.h>
               int idmin (int n, double *x, int incx);

IMPLEMENTATION
     These routines are part of the SCSL Scientific Library and can be loaded
     using either the -lscs or the -lscs_mp option.  The -lscs_mp option
     directs the linker to use the multi-processor version of the library.

     When linking to SCSL with -lscs or -lscs_mp, the default integer size is
     4 bytes (32 bits). Another version of SCSL is available in which integers
     are 8 bytes (64 bits).  This version allows the user access to larger
     memory sizes and helps when porting legacy Cray codes. It can be loaded
     by using the -lscs_i8 option or the -lscs_i8_mp option. A program may use
     only one of the two versions; 4-byte integer and 8-byte integer library
     calls cannot be mixed.

     The C and C++ prototypes shown above are appropriate for the 4-byte
     integer version of SCSL. When using the 8-byte integer version, the
     variables of type int become long long and the <scsl_blas_i8.h> header
     file should be included.

DESCRIPTION
     These routines search a vector for the first occurrence of the minimum
     value.

     ISMIN and IDMIN returns the first index i such that

          x  = MIN x  : j = 1, ..., n (j = 0, ..., n-1 for C/C++)
           i        j


     where xj is an element of a real vector.

     These functions have the following arguments:

     index Integer.  (output)
           First index of minimum value.

     n     Integer.  (input)
           Number of elements to process in the vector to be searched.  If
           n <= 0, ISMIN and ISMIN return 0 (-1 for C/C++).

     x     Array x of dimension 1 + (n-1) * |incx|.
           ISMIN: Single precision array.
           IDMIN: Double precision array.
           Array containing the vector to be searched.

     incx  Integer.  (input)
           Increment between elements of x.

NOTES
     When scanning backward (incx < 0), each routine starts at the end of the
     vector and moves backward, as follows:

     Fortran:

          x(1 - incx * (n-1)), x(1 - incx * (n-2)), ..., x(1)


     C/C++:

          x[-incx * (n-1)], x[-incx * (n-2)], ..., x(0)


     The desired value is at:

     Fortran:

          |x(1 + incx * (index-1))| when incx > 0

          |x(1 - incx * (n-index))| when incx < 0


     C/C++:

          |x[incx * (index-1)]| when incx > 0

          |x[-incx * (n-index)]| when incx < 0

     These routines are extensions to the Level 1 Basic Linear Algebra
     Subprograms (Level 1 BLAS).


   Data Types
     The following data types are described in this documentation.

     Term Used                     Data type

     Fortran:

          Array dimensioned n           x(n)

          Integer                       INTEGER (INTEGER*8 for -lscs_i8[_mp])

          Single precision              REAL

          Double precision              DOUBLE PRECISION

     C/C++:

          Array dimensioned n           x[n]

          Integer                       int (long long for -lscs_i8[_mp])

          Single precision              float

          Double precision              double

SEE ALSO
     INTRO_SCSL(3S), INTRO_BLAS1(3S)

     INTRO_CBLAS(3S) for information about using the C interface to Fortran 77
     Basic Linear Algebra Subprograms (legacy BLAS) set forth by the Basic
     Linear Algebra Subprograms Technical Forum.