VEC_$IAMAX Domain/OS VEC_$IAMAX
NAME
vec_$iamax - find the maximum absolute value in a 32-bit integer vector
SYNOPSIS (C)
#include <apollo/base.h>
#include <apollo/vec.h>
long int vec_$iamax(
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_$iamax(
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_$iamax(start_vec, length, result)
DESCRIPTION
Vec_$iamax searches through length elements of start_vec, places the
greatest absolute-valued element in result, and returns the location of
the element with the greatest absolute value. By contrast, vec_$irmax
finds the element with greatest signed value. (The procedure vec_$imax
is obsolete and should not be used.) Vec_$iamax_i differs from
vec_$iamax_i in that the argument vector contains 32-bit integers. In
the case of a tie, vec_$iamax returns the index of the first maximum
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 greatest element in start_vec.
NOTES
In C and Pascal, vec_$iamax searches a row vector; in FORTRAN, it
searches a column vector.
SEE ALSO
vec_$rmax, vec_$rmin, vec_$amin, vec_$amax_i, vec_$damax, vec_$damax_i,
vec_$amax, vec_$iamax_i, vec_$iamax16, vec_$iamax16_i.