LAPACK 3.11.0 LAPACK: Linear Algebra PACKage
Searching...
No Matches

## ◆ izmax1()

 integer function izmax1 ( integer N, complex*16, dimension(*) ZX, integer INCX )

IZMAX1 finds the index of the first vector element of maximum absolute value.

Purpose:
``` IZMAX1 finds the index of the first vector element of maximum absolute value.

Based on IZAMAX from Level 1 BLAS.
The change is to use the 'genuine' absolute value.```
Parameters
 [in] N ``` N is INTEGER The number of elements in the vector ZX.``` [in] ZX ``` ZX is COMPLEX*16 array, dimension (N) The vector ZX. The IZMAX1 function returns the index of its first element of maximum absolute value.``` [in] INCX ``` INCX is INTEGER The spacing between successive values of ZX. INCX >= 1.```
Contributors:
Nick Higham for use with ZLACON.

Definition at line 80 of file izmax1.f.

81*
82* -- LAPACK auxiliary routine --
83* -- LAPACK is a software package provided by Univ. of Tennessee, --
84* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
85*
86* .. Scalar Arguments ..
87 INTEGER INCX, N
88* ..
89* .. Array Arguments ..
90 COMPLEX*16 ZX(*)
91* ..
92*
93* =====================================================================
94*
95* .. Local Scalars ..
96 DOUBLE PRECISION DMAX
97 INTEGER I, IX
98* ..
99* .. Intrinsic Functions ..
100 INTRINSIC abs
101* ..
102* .. Executable Statements ..
103*
104 izmax1 = 0
105 IF (n.LT.1 .OR. incx.LE.0) RETURN
106 izmax1 = 1
107 IF (n.EQ.1) RETURN
108 IF (incx.EQ.1) THEN
109*
110* code for increment equal to 1
111*
112 dmax = abs(zx(1))
113 DO i = 2,n
114 IF (abs(zx(i)).GT.dmax) THEN
115 izmax1 = i
116 dmax = abs(zx(i))
117 END IF
118 END DO
119 ELSE
120*
121* code for increment not equal to 1
122*
123 ix = 1
124 dmax = abs(zx(1))
125 ix = ix + incx
126 DO i = 2,n
127 IF (abs(zx(ix)).GT.dmax) THEN
128 izmax1 = i
129 dmax = abs(zx(ix))
130 END IF
131 ix = ix + incx
132 END DO
133 END IF
134 RETURN
135*
136* End of IZMAX1
137*
integer function izmax1(N, ZX, INCX)
IZMAX1 finds the index of the first vector element of maximum absolute value.
Definition: izmax1.f:81
Here is the call graph for this function:
Here is the caller graph for this function: