Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

VEC_$DRMAX                        Domain/OS                         VEC_$DRMAX


NAME
     vec_$drmax - find the maximum value in a double-precision vector

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

     long int vec_$drmax(
          double *start_vec,
          long int &length,
          double *result)

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

     function vec_$drmax(
          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_$drmax(start_vec, length, result)

DESCRIPTION
     Vec_$drmax searches through length elements of start_vec, sets location
     to the greatest element, and returns the location of the element with the
     greatest value. By contrast, vec_$damax finds the element with greatest
     absolute value.  vec_$drmax differs from vec_$dmax in being a function
     instead of a procedure; vec_$dmax is now obsolete.

     In the case of a tie, vec_$drmax 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_$drmax searches a row vector; in FORTRAN, it
     searches a column vector.


SEE ALSO
     vec_$rmin, vec_$amax, vec_$amin, vec_$rmax_i, vec_$rmax, vec_$drmax_i,
     vec_$irmax, vec_$irmax_i, vec_$irmax16, vec_$irmax16_i.

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