VEC_$IRMIN Domain/OS VEC_$IRMIN
NAME
vec_$irmin - find the minimum value in a 32-bit integer vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
long int vec_$irmin(
long int *start_vec,
long int &length,
long int *result)
SYNOPSIS (Pascal)
%include '/sys/ins/base.ins.pas';
%include '/sys/ins/vec.ins.pas';
function vec_$irmin(
in start_vec: univ vec_$integer32_vector;
in length: integer32;
out result: integer32): integer32;
SYNOPSIS (FORTRAN)
%include '/sys/ins/base.ins.ftn'
%include '/sys/ins/vec.ins.ftn'
parameter (nvec = 10)
integer*4 start_vec(nvec), result
integer*4 length, location
location = vec_$irmin(start_vec, length, result)
DESCRIPTION
Vec_$irmin searches through length elements of start_vec, sets result to
the smallest value in the vector, and returns the location of the element
with the smallest value. By contrast, vec_$iamin finds the element with
smallest absolute value. In the case of a tie, vec_$irmin 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_$irmin searches a row vector; in FORTRAN, it
searches a column vector.
SEE ALSO
vec_$rmax, vec_$amax, vec_$amin, vec_$rmin_i, vec_$drmin, vec_$drmin_i,
vec_$rmin, vec_$irmin_i, vec_$irmin16, vec_$irmin16_i.