iamax(3)

πŸ’… iamax(3) β€” the "which element goes hardest" page (Library Functions Manual)

okay bestie, so this is a whole family of little Fortran functions β€” icamax, idamax, isamax, and izamax β€” that all do the exact same iconic thing: they find the index of the first element in a vector with the biggest magnitude. Depending on your data type (complex, double, real, or complex*16), one of the four is your girl. no cap, that's the whole vibe. πŸŽ€


✨ NAME ✨

iamax - iamax: argmax_i | real( x_i ) | + | imag( x_i ) |

Basically: the index of the element whose |Re(.)| + |Im(.)| is maxed out. periodt. 🫢


🌸 SYNOPSIS 🌸

πŸ’– Functions πŸ’–

integer function icamax (n, cx, incx)
    ICAMAX

integer function idamax (n, dx, incx)
    IDAMAX

integer function isamax (n, sx, incx)
    ISAMAX

integer function izamax (n, zx, incx)
    IZAMAX

four sisters, four data types, one mission. slay. ✨


πŸ¦‹ Detailed Description πŸ¦‹

highkey there isn't a big paragraph here β€” it just points you straight down to the Function Documentation. so that's where we're going, bestie. ⭐


πŸ‘‘ Function Documentation πŸ‘‘

πŸ”₯ integer function icamax (integer n, complex, dimension(*) cx, integer incx) πŸ”₯

ICAMAX

Purpose:

ICAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|

Parameters:

  • N β€” N is INTEGER. number of elements in input vector(s).
  • CX β€” CX is COMPLEX array, dimension ( 1 + ( N - 1 )*abs( INCX ) ).
  • INCX β€” INCX is INTEGER. storage spacing between elements of CX.

Author: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.

Further Details:

jack dongarra, linpack, 3/11/78.
modified 3/93 to return if incx .le. 0.
modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 70 of file icamax.f.


πŸ’œ integer function idamax (integer n, double precision, dimension(*) dx, integer incx) πŸ’œ

IDAMAX

Purpose:

IDAMAX finds the index of the first element having maximum absolute value.

Parameters:

  • N β€” N is INTEGER. number of elements in input vector(s).
  • DX β€” DX is DOUBLE PRECISION array, dimension ( 1 + ( N - 1 )*abs( INCX ) ).
  • INCX β€” INCX is INTEGER. storage spacing between elements of DX.

Author: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.

Further Details:

jack dongarra, linpack, 3/11/78.
modified 3/93 to return if incx .le. 0.
modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 70 of file idamax.f.


🌈 integer function isamax (integer n, real, dimension(*) sx, integer incx) 🌈

ISAMAX

Purpose:

ISAMAX finds the index of the first element having maximum absolute value.

Parameters:

  • N β€” N is INTEGER. number of elements in input vector(s).
  • SX β€” SX is REAL array, dimension ( 1 + ( N - 1 )*abs( INCX ) ).
  • INCX β€” INCX is INTEGER. storage spacing between elements of SX.

Author: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.

Further Details:

jack dongarra, linpack, 3/11/78.
modified 3/93 to return if incx .le. 0.
modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 70 of file isamax.f.


🧚 integer function izamax (integer n, complex*16, dimension(*) zx, integer incx) 🧚

IZAMAX

Purpose:

IZAMAX finds the index of the first element having maximum |Re(.)| + |Im(.)|

Parameters:

  • N β€” N is INTEGER. number of elements in input vector(s).
  • ZX β€” ZX is COMPLEX*16 array, dimension ( 1 + ( N - 1 )*abs( INCX ) ).
  • INCX β€” INCX is INTEGER. storage spacing between elements of ZX.

Author: Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver, NAG Ltd.

Further Details:

jack dongarra, 1/15/85.
modified 3/93 to return if incx .le. 0.
modified 12/3/93, array(1) declarations changed to array(*)

Definition at line 70 of file izamax.f.

πŸ’€ heads up bestie: for icamax and izamax the thing being maximized is |Re(.)| + |Im(.)| β€” not the plain absolute value. different math, don't mix them up. fr fr.

πŸ“ Author πŸ“

Generated automatically by Doxygen for LAPACK from the source code.


and that's the whole page, bestie β€” go find your max index and live your main character life. πŸ’…

signed, sealed, delivered by LAPACK, Version 3.12.0 πŸ¦‹βœ¨

πŸ“¦ where this page comes from