Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ vec_irmin16(A) — Apollo

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

vec_$rmax

vec_$amax

vec_$amin

vec_$rmin_i

vec_$drmin

vec_$drmin_i

vec_$rmin

vec_$irmin_i

vec_$irmin16_i

VEC_$IRMIN16                      Domain/OS                       VEC_$IRMIN16


NAME
     vec_$irmin16 - find the minimum value in a 16-bit integer vector

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/vec.h>

     long int vec_$irmin16(
          short int *start_vec,
          long int &length,
          short int *result)

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/vec.ins.pas';

     function vec_$irmin16(
          in start_vec: univ vec_$integer16_vector;
          in length: integer32;
          out result: integer16): integer32;

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/vec.ins.ftn'

           parameter (nvec = 10)

           integer*2 start_vec(nvec), result
           integer*4 length, location

           location = vec_$irmin16(start_vec, length, result)

DESCRIPTION
     Vec_$irmin16 searches through length elements of start_vec, sets result
     to the smallest value in the vector, and returns the location of the ele-
     ment with the smallest value. By contrast, vec_$iamin16 finds the element
     with smallest absolute value.  In the case of a tie, vec_$irmin16 returns
     the index of the first minimum value found.


     start_vec
          The vector to be searched.

     length
          The number of elements to be operated on;  normally the same as the
          number of elements in the vectors.

     result
          The value of the smallest element in start_vec.

NOTES
     In C and Pascal, vec_$irmin16 searches a row vector; in FORTRAN, it
     searches a column vector.

     Vec_$irmin16, like all 16-bit integer routines, performs poorly when com-
     pared to the 32-bit integer routines.  Its use should be avoided wherever
     possible, especially on high-performance workstations.

SEE ALSO
     vec_$rmax, vec_$amax, vec_$amin, vec_$rmin_i, vec_$drmin, vec_$drmin_i,
     vec_$rmin, vec_$irmin_i, vec_$rmin, vec_$irmin16_i.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026