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