| @@ -101,7 +101,7 @@ | |||||
| *> On entry D contains the singular values of the two submatrices | *> On entry D contains the singular values of the two submatrices | ||||
| *> to be combined. On exit D contains the trailing (N-K) updated | *> to be combined. On exit D contains the trailing (N-K) updated | ||||
| *> singular values (those which were deflated) sorted into | *> singular values (those which were deflated) sorted into | ||||
| *> increasing order. | |||||
| *> decreasing order. | |||||
| *> \endverbatim | *> \endverbatim | ||||
| *> | *> | ||||
| *> \param[out] Z | *> \param[out] Z | ||||
| @@ -454,7 +454,7 @@ | |||||
| * | * | ||||
| * Check if singular values are close enough to allow deflation. | * Check if singular values are close enough to allow deflation. | ||||
| * | * | ||||
| IF( ABS( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| IF( ( D( J )-D( JPREV ) ).LE.TOL ) THEN | |||||
| * | * | ||||
| * Deflation is possible. | * Deflation is possible. | ||||
| * | * | ||||
| @@ -490,7 +490,14 @@ | |||||
| CALL DROT( 1, VF( JPREV ), 1, VF( J ), 1, C, S ) | CALL DROT( 1, VF( JPREV ), 1, VF( J ), 1, C, S ) | ||||
| CALL DROT( 1, VL( JPREV ), 1, VL( J ), 1, C, S ) | CALL DROT( 1, VL( JPREV ), 1, VL( J ), 1, C, S ) | ||||
| K2 = K2 - 1 | K2 = K2 - 1 | ||||
| IDXP( K2 ) = JPREV | |||||
| * | |||||
| * Insert the deflated index in the correct position in IDXP. | |||||
| * If J - JPREV is greater than 1, the indices in between | |||||
| * must be shifted to preserve the correct output order. | |||||
| * | |||||
| DO 130 JP = JPREV, J - 1 | |||||
| IDXP( K2 + J - 1 - JP ) = JP | |||||
| 130 CONTINUE | |||||
| JPREV = J | JPREV = J | ||||
| ELSE | ELSE | ||||
| K = K + 1 | K = K + 1 | ||||