CVM Class Library  8.1
This C++ class library encapsulates concepts of vector and different matrices including square, band, symmetric and hermitian ones in Euclidean space of real and complex numbers.
 All Classes Files Functions Variables Typedefs Friends Macros Pages
izamin.f
Go to the documentation of this file.
1 c BLAS routine missing in ACML and some other implementations
2 
3  integer function izamin(n,zx,incx)
4 c
5 c finds the index of element having max. absolute value.
6 c
7  double complex zx(*)
8  double precision dmin
9  integer i,incx,ix,n
10  double precision cdabs
11 c
12  izamin = 0
13  if( n.lt.1 .or. incx.le.0 )return
14  izamin = 1
15  if(n.eq.1)return
16  if(incx.eq.1)go to 20
17 c
18 c code for increment not equal to 1
19 c
20  ix = 1
21  dmin = cdabs(zx(1))
22  ix = ix + incx
23  do 10 i = 2,n
24  if(cdabs(zx(ix)).ge.dmin) go to 5
25  izamin = i
26  dmin = cdabs(zx(ix))
27  5 ix = ix + incx
28  10 continue
29  return
30 c
31 c code for increment equal to 1
32 c
33  20 dmin = cdabs(zx(1))
34  do 30 i = 2,n
35  if(cdabs(zx(i)).ge.dmin) go to 30
36  izamin = i
37  dmin = cdabs(zx(i))
38  30 continue
39  return
40  end