| 1 | /* lapack/double/dsteqr.f -- translated by f2c (version 20090411). |
| 2 | You must link the resulting object file with libf2c: |
| 3 | on Microsoft Windows system, link with libf2c.lib; |
| 4 | on Linux or Unix systems, link with .../path/to/libf2c.a -lm |
| 5 | or, if you install libf2c.a in a standard place, with -lf2c -lm |
| 6 | -- in that order, at the end of the command line, as in |
| 7 | cc *.o -lf2c -lm |
| 8 | Source for libf2c is in /netlib/f2c/libf2c.zip, e.g., |
| 9 | |
| 10 | http://www.netlib.org/f2c/libf2c.zip |
| 11 | */ |
| 12 | |
| 13 | #ifdef __cplusplus |
| 14 | extern "C" { |
| 15 | #endif |
| 16 | #include "v3p_netlib.h"cxx . . $ `<file>/Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib.h`/ |
| 17 | |
| 18 | /* Table of constant values */ |
| 19 | |
| 20 | static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! c_b9cxx . . $ c_b9. = 0.; |
| 21 | static doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! c_b10cxx . . $ c_b10. = 1.; |
| 22 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__0cxx . . $ c__0. = 0; |
| 23 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__1cxx . . $ c__1. = 1; |
| 24 | static integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! c__2cxx . . $ c__2. = 2; |
| 25 | |
| 26 | /*< SUBROUTINE DSTEQR( COMPZ, N, D, E, Z, LDZ, WORK, INFO ) >*/ |
| 27 | /* Subroutine */ int dsteqr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:143:9`!(char *compz, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *n, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *d__, |
| 28 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *e, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *z__, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *ldz, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *work, |
| 29 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *info, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`! compz_len) |
| 30 | { |
| 31 | /* System generated locals */ |
| 32 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! z_dim1, z_offset, i__1, i__2; |
| 33 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! d__1, d__2; |
| 34 | |
| 35 | /* Builtin functions */ |
| 36 | double sqrtcxx . . $ sqrt(447c67c6676f75c3).(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`!), d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *); |
| 37 | |
| 38 | /* Local variables */ |
| 39 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! b, c__, f, g; |
| 40 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! i__, j, k, l, m; |
| 41 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! p, r__, s; |
| 42 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! l1, ii, mm, lm1, mm1, nm1; |
| 43 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! rt1, rt2, eps; |
| 44 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lsv; |
| 45 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! tst, eps2; |
| 46 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lend, jtot; |
| 47 | extern /* Subroutine */ int dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! |
| 48 | *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *); |
| 49 | extern logicalcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:65:9`! lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(const char *, const char *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 50 | extern /* Subroutine */ int dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!(char *, char *, char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 51 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 52 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 53 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! anorm; |
| 54 | extern /* Subroutine */ int dswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:146:9`!(integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 55 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *), dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 56 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 57 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *); |
| 58 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lendm1, lendp1; |
| 59 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *), dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!(char *, |
| 60 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 61 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! iscale; |
| 62 | extern /* Subroutine */ int dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, |
| 63 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 64 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!), dlaset_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:96:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! |
| 65 | *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 66 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! safmin; |
| 67 | extern /* Subroutine */ int dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 68 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *); |
| 69 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! safmax; |
| 70 | extern /* Subroutine */ int xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 71 | extern doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! dlanst_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:84:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 72 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 73 | extern /* Subroutine */ int dlasrt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:98:9`!(char *, integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! *, |
| 74 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! *, ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!); |
| 75 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! lendsv; |
| 76 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! ssfmin; |
| 77 | integercxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:63:9`! nmaxit, icompz; |
| 78 | doublerealcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:57:9`! ssfmax; |
| 79 | |
| 80 | |
| 81 | /* -- LAPACK routine (version 3.2) -- */ |
| 82 | /* -- LAPACK is a software package provided by Univ. of Tennessee, -- */ |
| 83 | /* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- */ |
| 84 | /* November 2006 */ |
| 85 | |
| 86 | /* .. Scalar Arguments .. */ |
| 87 | /*< CHARACTER COMPZ >*/ |
| 88 | /*< INTEGER INFO, LDZ, N >*/ |
| 89 | /* .. */ |
| 90 | /* .. Array Arguments .. */ |
| 91 | /*< DOUBLE PRECISION D( * ), E( * ), WORK( * ), Z( LDZ, * ) >*/ |
| 92 | /* .. */ |
| 93 | |
| 94 | /* Purpose */ |
| 95 | /* ======= */ |
| 96 | |
| 97 | /* DSTEQR computes all eigenvalues and, optionally, eigenvectors of a */ |
| 98 | /* symmetric tridiagonal matrix using the implicit QL or QR method. */ |
| 99 | /* The eigenvectors of a full or band symmetric matrix can also be found */ |
| 100 | /* if DSYTRD or DSPTRD or DSBTRD has been used to reduce this matrix to */ |
| 101 | /* tridiagonal form. */ |
| 102 | |
| 103 | /* Arguments */ |
| 104 | /* ========= */ |
| 105 | |
| 106 | /* COMPZ (input) CHARACTER*1 */ |
| 107 | /* = 'N': Compute eigenvalues only. */ |
| 108 | /* = 'V': Compute eigenvalues and eigenvectors of the original */ |
| 109 | /* symmetric matrix. On entry, Z must contain the */ |
| 110 | /* orthogonal matrix used to reduce the original matrix */ |
| 111 | /* to tridiagonal form. */ |
| 112 | /* = 'I': Compute eigenvalues and eigenvectors of the */ |
| 113 | /* tridiagonal matrix. Z is initialized to the identity */ |
| 114 | /* matrix. */ |
| 115 | |
| 116 | /* N (input) INTEGER */ |
| 117 | /* The order of the matrix. N >= 0. */ |
| 118 | |
| 119 | /* D (input/output) DOUBLE PRECISION array, dimension (N) */ |
| 120 | /* On entry, the diagonal elements of the tridiagonal matrix. */ |
| 121 | /* On exit, if INFO = 0, the eigenvalues in ascending order. */ |
| 122 | |
| 123 | /* E (input/output) DOUBLE PRECISION array, dimension (N-1) */ |
| 124 | /* On entry, the (n-1) subdiagonal elements of the tridiagonal */ |
| 125 | /* matrix. */ |
| 126 | /* On exit, E has been destroyed. */ |
| 127 | |
| 128 | /* Z (input/output) DOUBLE PRECISION array, dimension (LDZ, N) */ |
| 129 | /* On entry, if COMPZ = 'V', then Z contains the orthogonal */ |
| 130 | /* matrix used in the reduction to tridiagonal form. */ |
| 131 | /* On exit, if INFO = 0, then if COMPZ = 'V', Z contains the */ |
| 132 | /* orthonormal eigenvectors of the original symmetric matrix, */ |
| 133 | /* and if COMPZ = 'I', Z contains the orthonormal eigenvectors */ |
| 134 | /* of the symmetric tridiagonal matrix. */ |
| 135 | /* If COMPZ = 'N', then Z is not referenced. */ |
| 136 | |
| 137 | /* LDZ (input) INTEGER */ |
| 138 | /* The leading dimension of the array Z. LDZ >= 1, and if */ |
| 139 | /* eigenvectors are desired, then LDZ >= max(1,N). */ |
| 140 | |
| 141 | /* WORK (workspace) DOUBLE PRECISION array, dimension (max(1,2*N-2)) */ |
| 142 | /* If COMPZ = 'N', then WORK is not referenced. */ |
| 143 | |
| 144 | /* INFO (output) INTEGER */ |
| 145 | /* = 0: successful exit */ |
| 146 | /* < 0: if INFO = -i, the i-th argument had an illegal value */ |
| 147 | /* > 0: the algorithm has failed to find all the eigenvalues in */ |
| 148 | /* a total of 30*N iterations; if INFO = i, then i */ |
| 149 | /* elements of E have not converged to zero; on exit, D */ |
| 150 | /* and E contain the elements of a symmetric tridiagonal */ |
| 151 | /* matrix which is orthogonally similar to the original */ |
| 152 | /* matrix. */ |
| 153 | |
| 154 | /* ===================================================================== */ |
| 155 | |
| 156 | /* .. Parameters .. */ |
| 157 | /*< DOUBLE PRECISION ZERO, ONE, TWO, THREE >*/ |
| 158 | /*< >*/ |
| 159 | /*< INTEGER MAXIT >*/ |
| 160 | /*< PARAMETER ( MAXIT = 30 ) >*/ |
| 161 | /* .. */ |
| 162 | /* .. Local Scalars .. */ |
| 163 | /*< >*/ |
| 164 | /*< >*/ |
| 165 | /* .. */ |
| 166 | /* .. External Functions .. */ |
| 167 | /*< LOGICAL LSAME >*/ |
| 168 | /*< DOUBLE PRECISION DLAMCH, DLANST, DLAPY2 >*/ |
| 169 | /*< EXTERNAL LSAME, DLAMCH, DLANST, DLAPY2 >*/ |
| 170 | /* .. */ |
| 171 | /* .. External Subroutines .. */ |
| 172 | /*< >*/ |
| 173 | /* .. */ |
| 174 | /* .. Intrinsic Functions .. */ |
| 175 | /*< INTRINSIC ABS, MAX, SIGN, SQRT >*/ |
| 176 | /* .. */ |
| 177 | /* .. Executable Statements .. */ |
| 178 | |
| 179 | /* Test the input parameters. */ |
| 180 | |
| 181 | /*< INFO = 0 >*/ |
| 182 | /* Parameter adjustments */ |
| 183 | --d__; |
| 184 | --e; |
| 185 | z_dim1 = *ldz; |
| 186 | z_offset = 1 + z_dim1; |
| 187 | z__ -= z_offset; |
| 188 | --work; |
| 189 | |
| 190 | /* Function Body */ |
| 191 | *info = 0; |
| 192 | |
| 193 | /*< IF( LSAME( COMPZ, 'N' ) ) THEN >*/ |
| 194 | if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(compz, "N", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 195 | /*< ICOMPZ = 0 >*/ |
| 196 | icompz = 0; |
| 197 | /*< ELSE IF( LSAME( COMPZ, 'V' ) ) THEN >*/ |
| 198 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(compz, "V", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 199 | /*< ICOMPZ = 1 >*/ |
| 200 | icompz = 1; |
| 201 | /*< ELSE IF( LSAME( COMPZ, 'I' ) ) THEN >*/ |
| 202 | } else if (lsame_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:194:9`!(compz, "I", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1)) { |
| 203 | /*< ICOMPZ = 2 >*/ |
| 204 | icompz = 2; |
| 205 | /*< ELSE >*/ |
| 206 | } else { |
| 207 | /*< ICOMPZ = -1 >*/ |
| 208 | icompz = -1; |
| 209 | /*< END IF >*/ |
| 210 | } |
| 211 | /*< IF( ICOMPZ.LT.0 ) THEN >*/ |
| 212 | if (icompz < 0) { |
| 213 | /*< INFO = -1 >*/ |
| 214 | *info = -1; |
| 215 | /*< ELSE IF( N.LT.0 ) THEN >*/ |
| 216 | } else if (*n < 0) { |
| 217 | /*< INFO = -2 >*/ |
| 218 | *info = -2; |
| 219 | /*< >*/ |
| 220 | } else if (*ldz < 1 || (icompz > 0 && *ldz < maxcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:160:9`!(1,*n))) { |
| 221 | /*< INFO = -6 >*/ |
| 222 | *info = -6; |
| 223 | /*< END IF >*/ |
| 224 | } |
| 225 | /*< IF( INFO.NE.0 ) THEN >*/ |
| 226 | if (*info != 0) { |
| 227 | /*< CALL XERBLA( 'DSTEQR', -INFO ) >*/ |
| 228 | i__1 = -(*info); |
| 229 | xerbla_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:303:9`!("DSTEQR", &i__1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)6); |
| 230 | /*< RETURN >*/ |
| 231 | return 0; |
| 232 | /*< END IF >*/ |
| 233 | } |
| 234 | |
| 235 | /* Quick return if possible */ |
| 236 | |
| 237 | /*< >*/ |
| 238 | if (*n == 0) { |
| 239 | return 0; |
| 240 | } |
| 241 | |
| 242 | /*< IF( N.EQ.1 ) THEN >*/ |
| 243 | if (*n == 1) { |
| 244 | /*< >*/ |
| 245 | if (icompz == 2) { |
| 246 | z__[z_dim1 + 1] = 1.; |
| 247 | } |
| 248 | /*< RETURN >*/ |
| 249 | return 0; |
| 250 | /*< END IF >*/ |
| 251 | } |
| 252 | |
| 253 | /* Determine the unit roundoff and over/underflow thresholds. */ |
| 254 | |
| 255 | /*< EPS = DLAMCH( 'E' ) >*/ |
| 256 | eps = dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("E", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 257 | /*< EPS2 = EPS**2 >*/ |
| 258 | /* Computing 2nd power */ |
| 259 | d__1 = eps; |
| 260 | eps2 = d__1 * d__1; |
| 261 | /*< SAFMIN = DLAMCH( 'S' ) >*/ |
| 262 | safmin = dlamch_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:81:9`!("S", (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 263 | /*< SAFMAX = ONE / SAFMIN >*/ |
| 264 | safmax = 1. / safmin; |
| 265 | /*< SSFMAX = SQRT( SAFMAX ) / THREE >*/ |
| 266 | ssfmax = sqrtcxx . . $ sqrt(447c67c6676f75c3).(safmax) / 3.; |
| 267 | /*< SSFMIN = SQRT( SAFMIN ) / EPS2 >*/ |
| 268 | ssfmin = sqrtcxx . . $ sqrt(447c67c6676f75c3).(safmin) / eps2; |
| 269 | |
| 270 | /* Compute the eigenvalues and eigenvectors of the tridiagonal */ |
| 271 | /* matrix. */ |
| 272 | |
| 273 | /*< >*/ |
| 274 | if (icompz == 2) { |
| 275 | dlaset_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:96:9`!("Full", n, n, &c_b9cxx . . $ c_b9., &c_b10cxx . . $ c_b10., &z__[z_offset], ldz, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)4); |
| 276 | } |
| 277 | |
| 278 | /*< NMAXIT = N*MAXIT >*/ |
| 279 | nmaxit = *n * 30; |
| 280 | /*< JTOT = 0 >*/ |
| 281 | jtot = 0; |
| 282 | |
| 283 | /* Determine where the matrix splits and choose QL or QR iteration */ |
| 284 | /* for each block, according to whether top or bottom diagonal */ |
| 285 | /* element is smaller. */ |
| 286 | |
| 287 | /*< L1 = 1 >*/ |
| 288 | l1 = 1; |
| 289 | /*< NM1 = N - 1 >*/ |
| 290 | nm1 = *n - 1; |
| 291 | |
| 292 | /*< 10 CONTINUE >*/ |
| 293 | L10: |
| 294 | /*< >*/ |
| 295 | if (l1 > *n) { |
| 296 | goto L160; |
| 297 | } |
| 298 | /*< >*/ |
| 299 | if (l1 > 1) { |
| 300 | e[l1 - 1] = 0.; |
| 301 | } |
| 302 | /*< IF( L1.LE.NM1 ) THEN >*/ |
| 303 | if (l1 <= nm1) { |
| 304 | /*< DO 20 M = L1, NM1 >*/ |
| 305 | i__1 = nm1; |
| 306 | for (m = l1; m <= i__1; ++m) { |
| 307 | /*< TST = ABS( E( M ) ) >*/ |
| 308 | tst = (d__1 = e[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)); |
| 309 | /*< >*/ |
| 310 | if (tst == 0.) { |
| 311 | goto L30; |
| 312 | } |
| 313 | /*< >*/ |
| 314 | if (tst <= sqrtcxx . . $ sqrt(447c67c6676f75c3).((d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1))) * sqrtcxx . . $ sqrt(447c67c6676f75c3).((d__2 = d__[m |
| 315 | + 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2))) * eps) { |
| 316 | /*< E( M ) = ZERO >*/ |
| 317 | e[m] = 0.; |
| 318 | /*< GO TO 30 >*/ |
| 319 | goto L30; |
| 320 | /*< END IF >*/ |
| 321 | } |
| 322 | /*< 20 CONTINUE >*/ |
| 323 | /* L20: */ |
| 324 | } |
| 325 | /*< END IF >*/ |
| 326 | } |
| 327 | /*< M = N >*/ |
| 328 | m = *n; |
| 329 | |
| 330 | /*< 30 CONTINUE >*/ |
| 331 | L30: |
| 332 | /*< L = L1 >*/ |
| 333 | l = l1; |
| 334 | /*< LSV = L >*/ |
| 335 | lsv = l; |
| 336 | /*< LEND = M >*/ |
| 337 | lend = m; |
| 338 | /*< LENDSV = LEND >*/ |
| 339 | lendsv = lend; |
| 340 | /*< L1 = M + 1 >*/ |
| 341 | l1 = m + 1; |
| 342 | /*< >*/ |
| 343 | if (lend == l) { |
| 344 | goto L10; |
| 345 | } |
| 346 | |
| 347 | /* Scale submatrix in rows and columns L to LEND */ |
| 348 | |
| 349 | /*< ANORM = DLANST( 'I', LEND-L+1, D( L ), E( L ) ) >*/ |
| 350 | i__1 = lend - l + 1; |
| 351 | anorm = dlanst_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:84:9`!("I", &i__1, &d__[l], &e[l], (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 352 | /*< ISCALE = 0 >*/ |
| 353 | iscale = 0; |
| 354 | /*< >*/ |
| 355 | if (anorm == 0.) { |
| 356 | goto L10; |
| 357 | } |
| 358 | /*< IF( ANORM.GT.SSFMAX ) THEN >*/ |
| 359 | if (anorm > ssfmax) { |
| 360 | /*< ISCALE = 1 >*/ |
| 361 | iscale = 1; |
| 362 | /*< >*/ |
| 363 | i__1 = lend - l + 1; |
| 364 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmax, &i__1, &c__1cxx . . $ c__1., &d__[l], n, |
| 365 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 366 | /*< >*/ |
| 367 | i__1 = lend - l; |
| 368 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmax, &i__1, &c__1cxx . . $ c__1., &e[l], n, |
| 369 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 370 | /*< ELSE IF( ANORM.LT.SSFMIN ) THEN >*/ |
| 371 | } else if (anorm < ssfmin) { |
| 372 | /*< ISCALE = 2 >*/ |
| 373 | iscale = 2; |
| 374 | /*< >*/ |
| 375 | i__1 = lend - l + 1; |
| 376 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmin, &i__1, &c__1cxx . . $ c__1., &d__[l], n, |
| 377 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 378 | /*< >*/ |
| 379 | i__1 = lend - l; |
| 380 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &anorm, &ssfmin, &i__1, &c__1cxx . . $ c__1., &e[l], n, |
| 381 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 382 | /*< END IF >*/ |
| 383 | } |
| 384 | |
| 385 | /* Choose between QL and QR iteration */ |
| 386 | |
| 387 | /*< IF( ABS( D( LEND ) ).LT.ABS( D( L ) ) ) THEN >*/ |
| 388 | if ((d__1 = d__[lend], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) < (d__2 = d__[l], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2))) { |
| 389 | /*< LEND = LSV >*/ |
| 390 | lend = lsv; |
| 391 | /*< L = LENDSV >*/ |
| 392 | l = lendsv; |
| 393 | /*< END IF >*/ |
| 394 | } |
| 395 | |
| 396 | /*< IF( LEND.GT.L ) THEN >*/ |
| 397 | if (lend > l) { |
| 398 | |
| 399 | /* QL Iteration */ |
| 400 | |
| 401 | /* Look for small subdiagonal element. */ |
| 402 | |
| 403 | /*< 40 CONTINUE >*/ |
| 404 | L40: |
| 405 | /*< IF( L.NE.LEND ) THEN >*/ |
| 406 | if (l != lend) { |
| 407 | /*< LENDM1 = LEND - 1 >*/ |
| 408 | lendm1 = lend - 1; |
| 409 | /*< DO 50 M = L, LENDM1 >*/ |
| 410 | i__1 = lendm1; |
| 411 | for (m = l; m <= i__1; ++m) { |
| 412 | /*< TST = ABS( E( M ) )**2 >*/ |
| 413 | /* Computing 2nd power */ |
| 414 | d__2 = (d__1 = e[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)); |
| 415 | tst = d__2 * d__2; |
| 416 | /*< >*/ |
| 417 | if (tst <= eps2 * (d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) * (d__2 = d__[m |
| 418 | + 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)) + safmin) { |
| 419 | goto L60; |
| 420 | } |
| 421 | /*< 50 CONTINUE >*/ |
| 422 | /* L50: */ |
| 423 | } |
| 424 | /*< END IF >*/ |
| 425 | } |
| 426 | |
| 427 | /*< M = LEND >*/ |
| 428 | m = lend; |
| 429 | |
| 430 | /*< 60 CONTINUE >*/ |
| 431 | L60: |
| 432 | /*< >*/ |
| 433 | if (m < lend) { |
| 434 | e[m] = 0.; |
| 435 | } |
| 436 | /*< P = D( L ) >*/ |
| 437 | p = d__[l]; |
| 438 | /*< >*/ |
| 439 | if (m == l) { |
| 440 | goto L80; |
| 441 | } |
| 442 | |
| 443 | /* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 */ |
| 444 | /* to compute its eigensystem. */ |
| 445 | |
| 446 | /*< IF( M.EQ.L+1 ) THEN >*/ |
| 447 | if (m == l + 1) { |
| 448 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 449 | if (icompz > 0) { |
| 450 | /*< CALL DLAEV2( D( L ), E( L ), D( L+1 ), RT1, RT2, C, S ) >*/ |
| 451 | dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s); |
| 452 | /*< WORK( L ) = C >*/ |
| 453 | work[l] = c__; |
| 454 | /*< WORK( N-1+L ) = S >*/ |
| 455 | work[*n - 1 + l] = s; |
| 456 | /*< >*/ |
| 457 | dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("R", "V", "B", n, &c__2cxx . . $ c__2., &work[l], &work[*n - 1 + l], & |
| 458 | z__[l * z_dim1 + 1], ldz, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, ( |
| 459 | ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 460 | /*< ELSE >*/ |
| 461 | } else { |
| 462 | /*< CALL DLAE2( D( L ), E( L ), D( L+1 ), RT1, RT2 ) >*/ |
| 463 | dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2); |
| 464 | /*< END IF >*/ |
| 465 | } |
| 466 | /*< D( L ) = RT1 >*/ |
| 467 | d__[l] = rt1; |
| 468 | /*< D( L+1 ) = RT2 >*/ |
| 469 | d__[l + 1] = rt2; |
| 470 | /*< E( L ) = ZERO >*/ |
| 471 | e[l] = 0.; |
| 472 | /*< L = L + 2 >*/ |
| 473 | l += 2; |
| 474 | /*< >*/ |
| 475 | if (l <= lend) { |
| 476 | goto L40; |
| 477 | } |
| 478 | /*< GO TO 140 >*/ |
| 479 | goto L140; |
| 480 | /*< END IF >*/ |
| 481 | } |
| 482 | |
| 483 | /*< >*/ |
| 484 | if (jtot == nmaxit) { |
| 485 | goto L140; |
| 486 | } |
| 487 | /*< JTOT = JTOT + 1 >*/ |
| 488 | ++jtot; |
| 489 | |
| 490 | /* Form shift. */ |
| 491 | |
| 492 | /*< G = ( D( L+1 )-P ) / ( TWO*E( L ) ) >*/ |
| 493 | g = (d__[l + 1] - p) / (e[l] * 2.); |
| 494 | /*< R = DLAPY2( G, ONE ) >*/ |
| 495 | r__ = dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(&g, &c_b10cxx . . $ c_b10.); |
| 496 | /*< G = D( M ) - P + ( E( L ) / ( G+SIGN( R, G ) ) ) >*/ |
| 497 | g = d__[m] - p + e[l] / (g + d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(&r__, &g)); |
| 498 | |
| 499 | /*< S = ONE >*/ |
| 500 | s = 1.; |
| 501 | /*< C = ONE >*/ |
| 502 | c__ = 1.; |
| 503 | /*< P = ZERO >*/ |
| 504 | p = 0.; |
| 505 | |
| 506 | /* Inner loop */ |
| 507 | |
| 508 | /*< MM1 = M - 1 >*/ |
| 509 | mm1 = m - 1; |
| 510 | /*< DO 70 I = MM1, L, -1 >*/ |
| 511 | i__1 = l; |
| 512 | for (i__ = mm1; i__ >= i__1; --i__) { |
| 513 | /*< F = S*E( I ) >*/ |
| 514 | f = s * e[i__]; |
| 515 | /*< B = C*E( I ) >*/ |
| 516 | b = c__ * e[i__]; |
| 517 | /*< CALL DLARTG( G, F, C, S, R ) >*/ |
| 518 | dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(&g, &f, &c__, &s, &r__); |
| 519 | /*< >*/ |
| 520 | if (i__ != m - 1) { |
| 521 | e[i__ + 1] = r__; |
| 522 | } |
| 523 | /*< G = D( I+1 ) - P >*/ |
| 524 | g = d__[i__ + 1] - p; |
| 525 | /*< R = ( D( I )-G )*S + TWO*C*B >*/ |
| 526 | r__ = (d__[i__] - g) * s + c__ * 2. * b; |
| 527 | /*< P = S*R >*/ |
| 528 | p = s * r__; |
| 529 | /*< D( I+1 ) = G + P >*/ |
| 530 | d__[i__ + 1] = g + p; |
| 531 | /*< G = C*R - B >*/ |
| 532 | g = c__ * r__ - b; |
| 533 | |
| 534 | /* If eigenvectors are desired, then save rotations. */ |
| 535 | |
| 536 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 537 | if (icompz > 0) { |
| 538 | /*< WORK( I ) = C >*/ |
| 539 | work[i__] = c__; |
| 540 | /*< WORK( N-1+I ) = -S >*/ |
| 541 | work[*n - 1 + i__] = -s; |
| 542 | /*< END IF >*/ |
| 543 | } |
| 544 | |
| 545 | /*< 70 CONTINUE >*/ |
| 546 | /* L70: */ |
| 547 | } |
| 548 | |
| 549 | /* If eigenvectors are desired, then apply saved rotations. */ |
| 550 | |
| 551 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 552 | if (icompz > 0) { |
| 553 | /*< MM = M - L + 1 >*/ |
| 554 | mm = m - l + 1; |
| 555 | /*< >*/ |
| 556 | dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("R", "V", "B", n, &mm, &work[l], &work[*n - 1 + l], &z__[l |
| 557 | * z_dim1 + 1], ldz, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 558 | /*< END IF >*/ |
| 559 | } |
| 560 | |
| 561 | /*< D( L ) = D( L ) - P >*/ |
| 562 | d__[l] -= p; |
| 563 | /*< E( L ) = G >*/ |
| 564 | e[l] = g; |
| 565 | /*< GO TO 40 >*/ |
| 566 | goto L40; |
| 567 | |
| 568 | /* Eigenvalue found. */ |
| 569 | |
| 570 | /*< 80 CONTINUE >*/ |
| 571 | L80: |
| 572 | /*< D( L ) = P >*/ |
| 573 | d__[l] = p; |
| 574 | |
| 575 | /*< L = L + 1 >*/ |
| 576 | ++l; |
| 577 | /*< >*/ |
| 578 | if (l <= lend) { |
| 579 | goto L40; |
| 580 | } |
| 581 | /*< GO TO 140 >*/ |
| 582 | goto L140; |
| 583 | |
| 584 | /*< ELSE >*/ |
| 585 | } else { |
| 586 | |
| 587 | /* QR Iteration */ |
| 588 | |
| 589 | /* Look for small superdiagonal element. */ |
| 590 | |
| 591 | /*< 90 CONTINUE >*/ |
| 592 | L90: |
| 593 | /*< IF( L.NE.LEND ) THEN >*/ |
| 594 | if (l != lend) { |
| 595 | /*< LENDP1 = LEND + 1 >*/ |
| 596 | lendp1 = lend + 1; |
| 597 | /*< DO 100 M = L, LENDP1, -1 >*/ |
| 598 | i__1 = lendp1; |
| 599 | for (m = l; m >= i__1; --m) { |
| 600 | /*< TST = ABS( E( M-1 ) )**2 >*/ |
| 601 | /* Computing 2nd power */ |
| 602 | d__2 = (d__1 = e[m - 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)); |
| 603 | tst = d__2 * d__2; |
| 604 | /*< >*/ |
| 605 | if (tst <= eps2 * (d__1 = d__[m], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__1)) * (d__2 = d__[m |
| 606 | - 1], abscxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_original.h:157:9`!(d__2)) + safmin) { |
| 607 | goto L110; |
| 608 | } |
| 609 | /*< 100 CONTINUE >*/ |
| 610 | /* L100: */ |
| 611 | } |
| 612 | /*< END IF >*/ |
| 613 | } |
| 614 | |
| 615 | /*< M = LEND >*/ |
| 616 | m = lend; |
| 617 | |
| 618 | /*< 110 CONTINUE >*/ |
| 619 | L110: |
| 620 | /*< >*/ |
| 621 | if (m > lend) { |
| 622 | e[m - 1] = 0.; |
| 623 | } |
| 624 | /*< P = D( L ) >*/ |
| 625 | p = d__[l]; |
| 626 | /*< >*/ |
| 627 | if (m == l) { |
| 628 | goto L130; |
| 629 | } |
| 630 | |
| 631 | /* If remaining matrix is 2-by-2, use DLAE2 or SLAEV2 */ |
| 632 | /* to compute its eigensystem. */ |
| 633 | |
| 634 | /*< IF( M.EQ.L-1 ) THEN >*/ |
| 635 | if (m == l - 1) { |
| 636 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 637 | if (icompz > 0) { |
| 638 | /*< CALL DLAEV2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2, C, S ) >*/ |
| 639 | dlaev2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:72:9`!(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s) |
| 640 | ; |
| 641 | /*< WORK( M ) = C >*/ |
| 642 | work[m] = c__; |
| 643 | /*< WORK( N-1+M ) = S >*/ |
| 644 | work[*n - 1 + m] = s; |
| 645 | /*< >*/ |
| 646 | dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("R", "V", "F", n, &c__2cxx . . $ c__2., &work[m], &work[*n - 1 + m], & |
| 647 | z__[(l - 1) * z_dim1 + 1], ldz, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, |
| 648 | (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 649 | /*< ELSE >*/ |
| 650 | } else { |
| 651 | /*< CALL DLAE2( D( L-1 ), E( L-1 ), D( L ), RT1, RT2 ) >*/ |
| 652 | dlae2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:70:9`!(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2); |
| 653 | /*< END IF >*/ |
| 654 | } |
| 655 | /*< D( L-1 ) = RT1 >*/ |
| 656 | d__[l - 1] = rt1; |
| 657 | /*< D( L ) = RT2 >*/ |
| 658 | d__[l] = rt2; |
| 659 | /*< E( L-1 ) = ZERO >*/ |
| 660 | e[l - 1] = 0.; |
| 661 | /*< L = L - 2 >*/ |
| 662 | l += -2; |
| 663 | /*< >*/ |
| 664 | if (l >= lend) { |
| 665 | goto L90; |
| 666 | } |
| 667 | /*< GO TO 140 >*/ |
| 668 | goto L140; |
| 669 | /*< END IF >*/ |
| 670 | } |
| 671 | |
| 672 | /*< >*/ |
| 673 | if (jtot == nmaxit) { |
| 674 | goto L140; |
| 675 | } |
| 676 | /*< JTOT = JTOT + 1 >*/ |
| 677 | ++jtot; |
| 678 | |
| 679 | /* Form shift. */ |
| 680 | |
| 681 | /*< G = ( D( L-1 )-P ) / ( TWO*E( L-1 ) ) >*/ |
| 682 | g = (d__[l - 1] - p) / (e[l - 1] * 2.); |
| 683 | /*< R = DLAPY2( G, ONE ) >*/ |
| 684 | r__ = dlapy2_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:85:9`!(&g, &c_b10cxx . . $ c_b10.); |
| 685 | /*< G = D( M ) - P + ( E( L-1 ) / ( G+SIGN( R, G ) ) ) >*/ |
| 686 | g = d__[m] - p + e[l - 1] / (g + d_signcxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:14:9`!(&r__, &g)); |
| 687 | |
| 688 | /*< S = ONE >*/ |
| 689 | s = 1.; |
| 690 | /*< C = ONE >*/ |
| 691 | c__ = 1.; |
| 692 | /*< P = ZERO >*/ |
| 693 | p = 0.; |
| 694 | |
| 695 | /* Inner loop */ |
| 696 | |
| 697 | /*< LM1 = L - 1 >*/ |
| 698 | lm1 = l - 1; |
| 699 | /*< DO 120 I = M, LM1 >*/ |
| 700 | i__1 = lm1; |
| 701 | for (i__ = m; i__ <= i__1; ++i__) { |
| 702 | /*< F = S*E( I ) >*/ |
| 703 | f = s * e[i__]; |
| 704 | /*< B = C*E( I ) >*/ |
| 705 | b = c__ * e[i__]; |
| 706 | /*< CALL DLARTG( G, F, C, S, R ) >*/ |
| 707 | dlartg_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:93:9`!(&g, &f, &c__, &s, &r__); |
| 708 | /*< >*/ |
| 709 | if (i__ != m) { |
| 710 | e[i__ - 1] = r__; |
| 711 | } |
| 712 | /*< G = D( I ) - P >*/ |
| 713 | g = d__[i__] - p; |
| 714 | /*< R = ( D( I+1 )-G )*S + TWO*C*B >*/ |
| 715 | r__ = (d__[i__ + 1] - g) * s + c__ * 2. * b; |
| 716 | /*< P = S*R >*/ |
| 717 | p = s * r__; |
| 718 | /*< D( I ) = G + P >*/ |
| 719 | d__[i__] = g + p; |
| 720 | /*< G = C*R - B >*/ |
| 721 | g = c__ * r__ - b; |
| 722 | |
| 723 | /* If eigenvectors are desired, then save rotations. */ |
| 724 | |
| 725 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 726 | if (icompz > 0) { |
| 727 | /*< WORK( I ) = C >*/ |
| 728 | work[i__] = c__; |
| 729 | /*< WORK( N-1+I ) = S >*/ |
| 730 | work[*n - 1 + i__] = s; |
| 731 | /*< END IF >*/ |
| 732 | } |
| 733 | |
| 734 | /*< 120 CONTINUE >*/ |
| 735 | /* L120: */ |
| 736 | } |
| 737 | |
| 738 | /* If eigenvectors are desired, then apply saved rotations. */ |
| 739 | |
| 740 | /*< IF( ICOMPZ.GT.0 ) THEN >*/ |
| 741 | if (icompz > 0) { |
| 742 | /*< MM = L - M + 1 >*/ |
| 743 | mm = l - m + 1; |
| 744 | /*< >*/ |
| 745 | dlasr_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:97:9`!("R", "V", "F", n, &mm, &work[m], &work[*n - 1 + m], &z__[m |
| 746 | * z_dim1 + 1], ldz, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 747 | /*< END IF >*/ |
| 748 | } |
| 749 | |
| 750 | /*< D( L ) = D( L ) - P >*/ |
| 751 | d__[l] -= p; |
| 752 | /*< E( LM1 ) = G >*/ |
| 753 | e[lm1] = g; |
| 754 | /*< GO TO 90 >*/ |
| 755 | goto L90; |
| 756 | |
| 757 | /* Eigenvalue found. */ |
| 758 | |
| 759 | /*< 130 CONTINUE >*/ |
| 760 | L130: |
| 761 | /*< D( L ) = P >*/ |
| 762 | d__[l] = p; |
| 763 | |
| 764 | /*< L = L - 1 >*/ |
| 765 | --l; |
| 766 | /*< >*/ |
| 767 | if (l >= lend) { |
| 768 | goto L90; |
| 769 | } |
| 770 | /*< GO TO 140 >*/ |
| 771 | goto L140; |
| 772 | |
| 773 | /*< END IF >*/ |
| 774 | } |
| 775 | |
| 776 | /* Undo scaling if necessary */ |
| 777 | |
| 778 | /*< 140 CONTINUE >*/ |
| 779 | L140: |
| 780 | /*< IF( ISCALE.EQ.1 ) THEN >*/ |
| 781 | if (iscale == 1) { |
| 782 | /*< >*/ |
| 783 | i__1 = lendsv - lsv + 1; |
| 784 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmax, &anorm, &i__1, &c__1cxx . . $ c__1., &d__[lsv], |
| 785 | n, info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 786 | /*< >*/ |
| 787 | i__1 = lendsv - lsv; |
| 788 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmax, &anorm, &i__1, &c__1cxx . . $ c__1., &e[lsv], n, |
| 789 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 790 | /*< ELSE IF( ISCALE.EQ.2 ) THEN >*/ |
| 791 | } else if (iscale == 2) { |
| 792 | /*< >*/ |
| 793 | i__1 = lendsv - lsv + 1; |
| 794 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmin, &anorm, &i__1, &c__1cxx . . $ c__1., &d__[lsv], |
| 795 | n, info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 796 | /*< >*/ |
| 797 | i__1 = lendsv - lsv; |
| 798 | dlascl_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:95:9`!("G", &c__0cxx . . $ c__0., &c__0cxx . . $ c__0., &ssfmin, &anorm, &i__1, &c__1cxx . . $ c__1., &e[lsv], n, |
| 799 | info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 800 | /*< END IF >*/ |
| 801 | } |
| 802 | |
| 803 | /* Check for no convergence to an eigenvalue after a total */ |
| 804 | /* of N*MAXIT iterations. */ |
| 805 | |
| 806 | /*< >*/ |
| 807 | if (jtot < nmaxit) { |
| 808 | goto L10; |
| 809 | } |
| 810 | /*< DO 150 I = 1, N - 1 >*/ |
| 811 | i__1 = *n - 1; |
| 812 | for (i__ = 1; i__ <= i__1; ++i__) { |
| 813 | /*< >*/ |
| 814 | if (e[i__] != 0.) { |
| 815 | ++(*info); |
| 816 | } |
| 817 | /*< 150 CONTINUE >*/ |
| 818 | /* L150: */ |
| 819 | } |
| 820 | /*< GO TO 190 >*/ |
| 821 | goto L190; |
| 822 | |
| 823 | /* Order eigenvalues and eigenvectors. */ |
| 824 | |
| 825 | /*< 160 CONTINUE >*/ |
| 826 | L160: |
| 827 | /*< IF( ICOMPZ.EQ.0 ) THEN >*/ |
| 828 | if (icompz == 0) { |
| 829 | |
| 830 | /* Use Quick Sort */ |
| 831 | |
| 832 | /*< CALL DLASRT( 'I', N, D, INFO ) >*/ |
| 833 | dlasrt_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:98:9`!("I", n, &d__[1], info, (ftnlencxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_f2c_mangle.h:60:9`!)1); |
| 834 | |
| 835 | /*< ELSE >*/ |
| 836 | } else { |
| 837 | |
| 838 | /* Use Selection Sort to minimize swaps of eigenvectors */ |
| 839 | |
| 840 | /*< DO 180 II = 2, N >*/ |
| 841 | i__1 = *n; |
| 842 | for (ii = 2; ii <= i__1; ++ii) { |
| 843 | /*< I = II - 1 >*/ |
| 844 | i__ = ii - 1; |
| 845 | /*< K = I >*/ |
| 846 | k = i__; |
| 847 | /*< P = D( I ) >*/ |
| 848 | p = d__[i__]; |
| 849 | /*< DO 170 J = II, N >*/ |
| 850 | i__2 = *n; |
| 851 | for (j = ii; j <= i__2; ++j) { |
| 852 | /*< IF( D( J ).LT.P ) THEN >*/ |
| 853 | if (d__[j] < p) { |
| 854 | /*< K = J >*/ |
| 855 | k = j; |
| 856 | /*< P = D( J ) >*/ |
| 857 | p = d__[j]; |
| 858 | /*< END IF >*/ |
| 859 | } |
| 860 | /*< 170 CONTINUE >*/ |
| 861 | /* L170: */ |
| 862 | } |
| 863 | /*< IF( K.NE.I ) THEN >*/ |
| 864 | if (k != i__) { |
| 865 | /*< D( K ) = D( I ) >*/ |
| 866 | d__[k] = d__[i__]; |
| 867 | /*< D( I ) = P >*/ |
| 868 | d__[i__] = p; |
| 869 | /*< CALL DSWAP( N, Z( 1, I ), 1, Z( 1, K ), 1 ) >*/ |
| 870 | dswap_cxx . . $ `Modules/ThirdParty/VNL/src/vxl/v3p/netlib/v3p_netlib_mangle.h:146:9`!(n, &z__[i__ * z_dim1 + 1], &c__1cxx . . $ c__1., &z__[k * z_dim1 + 1], |
| 871 | &c__1cxx . . $ c__1.); |
| 872 | /*< END IF >*/ |
| 873 | } |
| 874 | /*< 180 CONTINUE >*/ |
| 875 | /* L180: */ |
| 876 | } |
| 877 | /*< END IF >*/ |
| 878 | } |
| 879 | |
| 880 | /*< 190 CONTINUE >*/ |
| 881 | L190: |
| 882 | /*< RETURN >*/ |
| 883 | return 0; |
| 884 | |
| 885 | /* End of DSTEQR */ |
| 886 | |
| 887 | /*< END >*/ |
| 888 | } /* dsteqr_ */ |
| 889 | |
| 890 | #ifdef __cplusplus |
| 891 | } |
| 892 | #endif |