whitespace fixes
This commit is contained in:
@ -1,13 +1,13 @@
|
||||
/* fortran/dlasq1.f -- translated by f2c (version 20200916).
|
||||
You must link the resulting object file with libf2c:
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
on Microsoft Windows system, link with libf2c.lib;
|
||||
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
|
||||
or, if you install libf2c.a in a standard place, with -lf2c -lm
|
||||
-- in that order, at the end of the command line, as in
|
||||
cc *.o -lf2c -lm
|
||||
Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
|
||||
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
http://www.netlib.org/f2c/libf2c.zip
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -130,8 +130,8 @@ f"> */
|
||||
/* > \ingroup auxOTHERcomputational */
|
||||
|
||||
/* ===================================================================== */
|
||||
/* Subroutine */ int dlasq1_(integer *n, doublereal *d__, doublereal *e,
|
||||
doublereal *work, integer *info)
|
||||
/* Subroutine */ int dlasq1_(integer *n, doublereal *d__, doublereal *e,
|
||||
doublereal *work, integer *info)
|
||||
{
|
||||
/* System generated locals */
|
||||
integer i__1, i__2;
|
||||
@ -143,22 +143,22 @@ f"> */
|
||||
/* Local variables */
|
||||
integer i__;
|
||||
doublereal eps;
|
||||
extern /* Subroutine */ int dlas2_(doublereal *, doublereal *, doublereal
|
||||
*, doublereal *, doublereal *);
|
||||
extern /* Subroutine */ int dlas2_(doublereal *, doublereal *, doublereal
|
||||
*, doublereal *, doublereal *);
|
||||
doublereal scale;
|
||||
integer iinfo;
|
||||
doublereal sigmn;
|
||||
extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *,
|
||||
doublereal *, integer *);
|
||||
extern /* Subroutine */ int dcopy_(integer *, doublereal *, integer *,
|
||||
doublereal *, integer *);
|
||||
doublereal sigmx;
|
||||
extern /* Subroutine */ int dlasq2_(integer *, doublereal *, integer *);
|
||||
extern doublereal dlamch_(char *, ftnlen);
|
||||
extern /* Subroutine */ int dlascl_(char *, integer *, integer *,
|
||||
doublereal *, doublereal *, integer *, integer *, doublereal *,
|
||||
integer *, integer *, ftnlen);
|
||||
extern /* Subroutine */ int dlascl_(char *, integer *, integer *,
|
||||
doublereal *, doublereal *, integer *, integer *, doublereal *,
|
||||
integer *, integer *, ftnlen);
|
||||
doublereal safmin;
|
||||
extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen), dlasrt_(
|
||||
char *, integer *, doublereal *, integer *, ftnlen);
|
||||
char *, integer *, doublereal *, integer *, ftnlen);
|
||||
|
||||
|
||||
/* -- LAPACK computational routine -- */
|
||||
@ -192,20 +192,20 @@ f"> */
|
||||
/* Function Body */
|
||||
*info = 0;
|
||||
if (*n < 0) {
|
||||
*info = -1;
|
||||
i__1 = -(*info);
|
||||
xerbla_((char *)"DLASQ1", &i__1, (ftnlen)6);
|
||||
return 0;
|
||||
*info = -1;
|
||||
i__1 = -(*info);
|
||||
xerbla_((char *)"DLASQ1", &i__1, (ftnlen)6);
|
||||
return 0;
|
||||
} else if (*n == 0) {
|
||||
return 0;
|
||||
return 0;
|
||||
} else if (*n == 1) {
|
||||
d__[1] = abs(d__[1]);
|
||||
return 0;
|
||||
d__[1] = abs(d__[1]);
|
||||
return 0;
|
||||
} else if (*n == 2) {
|
||||
dlas2_(&d__[1], &e[1], &d__[2], &sigmn, &sigmx);
|
||||
d__[1] = sigmx;
|
||||
d__[2] = sigmn;
|
||||
return 0;
|
||||
dlas2_(&d__[1], &e[1], &d__[2], &sigmn, &sigmx);
|
||||
d__[1] = sigmx;
|
||||
d__[2] = sigmn;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Estimate the largest singular value. */
|
||||
@ -213,10 +213,10 @@ f"> */
|
||||
sigmx = 0.;
|
||||
i__1 = *n - 1;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
d__[i__] = (d__1 = d__[i__], abs(d__1));
|
||||
d__[i__] = (d__1 = d__[i__], abs(d__1));
|
||||
/* Computing MAX */
|
||||
d__2 = sigmx, d__3 = (d__1 = e[i__], abs(d__1));
|
||||
sigmx = max(d__2,d__3);
|
||||
d__2 = sigmx, d__3 = (d__1 = e[i__], abs(d__1));
|
||||
sigmx = max(d__2,d__3);
|
||||
/* L10: */
|
||||
}
|
||||
d__[*n] = (d__1 = d__[*n], abs(d__1));
|
||||
@ -224,15 +224,15 @@ f"> */
|
||||
/* Early return if SIGMX is zero (matrix is already diagonal). */
|
||||
|
||||
if (sigmx == 0.) {
|
||||
dlasrt_((char *)"D", n, &d__[1], &iinfo, (ftnlen)1);
|
||||
return 0;
|
||||
dlasrt_((char *)"D", n, &d__[1], &iinfo, (ftnlen)1);
|
||||
return 0;
|
||||
}
|
||||
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
/* Computing MAX */
|
||||
d__1 = sigmx, d__2 = d__[i__];
|
||||
sigmx = max(d__1,d__2);
|
||||
d__1 = sigmx, d__2 = d__[i__];
|
||||
sigmx = max(d__1,d__2);
|
||||
/* L20: */
|
||||
}
|
||||
|
||||
@ -247,16 +247,16 @@ f"> */
|
||||
dcopy_(&i__1, &e[1], &c__1, &work[2], &c__2);
|
||||
i__1 = (*n << 1) - 1;
|
||||
i__2 = (*n << 1) - 1;
|
||||
dlascl_((char *)"G", &c__0, &c__0, &sigmx, &scale, &i__1, &c__1, &work[1], &i__2,
|
||||
&iinfo, (ftnlen)1);
|
||||
dlascl_((char *)"G", &c__0, &c__0, &sigmx, &scale, &i__1, &c__1, &work[1], &i__2,
|
||||
&iinfo, (ftnlen)1);
|
||||
|
||||
/* Compute the q's and e's. */
|
||||
|
||||
i__1 = (*n << 1) - 1;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
/* Computing 2nd power */
|
||||
d__1 = work[i__];
|
||||
work[i__] = d__1 * d__1;
|
||||
d__1 = work[i__];
|
||||
work[i__] = d__1 * d__1;
|
||||
/* L30: */
|
||||
}
|
||||
work[*n * 2] = 0.;
|
||||
@ -264,27 +264,27 @@ f"> */
|
||||
dlasq2_(n, &work[1], info);
|
||||
|
||||
if (*info == 0) {
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
d__[i__] = sqrt(work[i__]);
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
d__[i__] = sqrt(work[i__]);
|
||||
/* L40: */
|
||||
}
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &d__[1], n, &
|
||||
iinfo, (ftnlen)1);
|
||||
}
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &d__[1], n, &
|
||||
iinfo, (ftnlen)1);
|
||||
} else if (*info == 2) {
|
||||
|
||||
/* Maximum number of iterations exceeded. Move data from WORK */
|
||||
/* into D and E so the calling subroutine can try to finish */
|
||||
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
d__[i__] = sqrt(work[(i__ << 1) - 1]);
|
||||
e[i__] = sqrt(work[i__ * 2]);
|
||||
}
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &d__[1], n, &
|
||||
iinfo, (ftnlen)1);
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &e[1], n, &iinfo,
|
||||
(ftnlen)1);
|
||||
i__1 = *n;
|
||||
for (i__ = 1; i__ <= i__1; ++i__) {
|
||||
d__[i__] = sqrt(work[(i__ << 1) - 1]);
|
||||
e[i__] = sqrt(work[i__ * 2]);
|
||||
}
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &d__[1], n, &
|
||||
iinfo, (ftnlen)1);
|
||||
dlascl_((char *)"G", &c__0, &c__0, &scale, &sigmx, n, &c__1, &e[1], n, &iinfo,
|
||||
(ftnlen)1);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -294,5 +294,5 @@ f"> */
|
||||
} /* dlasq1_ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user