maxloc.c
Go to the documentation of this file.
00001 /* maxloc.f -- translated by f2c (version 20061008).
00002    You must link the resulting object file with libf2c:
00003         on Microsoft Windows system, link with libf2c.lib;
00004         on Linux or Unix systems, link with .../path/to/libf2c.a -lm
00005         or, if you install libf2c.a in a standard place, with -lf2c -lm
00006         -- in that order, at the end of the command line, as in
00007                 cc *.o -lf2c -lm
00008         Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
00009 
00010                 http://www.netlib.org/f2c/libf2c.zip
00011 */
00012 
00013 #include "f2c.h"
00014 
00015 /* ********************************************************************************** */
00016 integer smaxloc_(real *a, integer *dimm)
00017 {
00018     /* System generated locals */
00019     integer ret_val, i__1;
00020 
00021     /* Local variables */
00022     integer i__;
00023     real smax;
00024 
00025 
00026 
00027     /* Parameter adjustments */
00028     --a;
00029 
00030     /* Function Body */
00031     ret_val = 1;
00032     smax = a[1];
00033     i__1 = *dimm;
00034     for (i__ = 2; i__ <= i__1; ++i__) {
00035         if (smax < a[i__]) {
00036             smax = a[i__];
00037             ret_val = i__;
00038         }
00039 /* L10: */
00040     }
00041     return ret_val;
00042 } /* smaxloc_ */
00043 
00044 /* ********************************************************************************** */
00045 integer dmaxloc_(doublereal *a, integer *dimm)
00046 {
00047     /* System generated locals */
00048     integer ret_val, i__1;
00049 
00050     /* Local variables */
00051     integer i__;
00052     doublereal dmax__;
00053 
00054 
00055 
00056     /* Parameter adjustments */
00057     --a;
00058 
00059     /* Function Body */
00060     ret_val = 1;
00061     dmax__ = a[1];
00062     i__1 = *dimm;
00063     for (i__ = 2; i__ <= i__1; ++i__) {
00064         if (dmax__ < a[i__]) {
00065             dmax__ = a[i__];
00066             ret_val = i__;
00067         }
00068 /* L20: */
00069     }
00070     return ret_val;
00071 } /* dmaxloc_ */


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:56