--- 
:name: dlaed1
:md5sum: de28a4b248244bebc9ea6c8ab7809f3b
:category: :subroutine
:arguments: 
- n: 
    :type: integer
    :intent: input
- d: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - n
- q: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - ldq
    - n
- ldq: 
    :type: integer
    :intent: input
- indxq: 
    :type: integer
    :intent: input/output
    :dims: 
    - n
- rho: 
    :type: doublereal
    :intent: input
- cutpnt: 
    :type: integer
    :intent: input
- work: 
    :type: doublereal
    :intent: workspace
    :dims: 
    - 4*n + pow(n,2)
- iwork: 
    :type: integer
    :intent: workspace
    :dims: 
    - 4*n
- info: 
    :type: integer
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE DLAED1( N, D, Q, LDQ, INDXQ, RHO, CUTPNT, WORK, IWORK, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DLAED1 computes the updated eigensystem of a diagonal\n\
  *  matrix after modification by a rank-one symmetric matrix.  This\n\
  *  routine is used only for the eigenproblem which requires all\n\
  *  eigenvalues and eigenvectors of a tridiagonal matrix.  DLAED7 handles\n\
  *  the case in which eigenvalues only or eigenvalues and eigenvectors\n\
  *  of a full symmetric matrix (which was reduced to tridiagonal form)\n\
  *  are desired.\n\
  *\n\
  *    T = Q(in) ( D(in) + RHO * Z*Z' ) Q'(in) = Q(out) * D(out) * Q'(out)\n\
  *\n\
  *     where Z = Q'u, u is a vector of length N with ones in the\n\
  *     CUTPNT and CUTPNT + 1 th elements and zeros elsewhere.\n\
  *\n\
  *     The eigenvectors of the original matrix are stored in Q, and the\n\
  *     eigenvalues are in D.  The algorithm consists of three stages:\n\
  *\n\
  *        The first stage consists of deflating the size of the problem\n\
  *        when there are multiple eigenvalues or if there is a zero in\n\
  *        the Z vector.  For each such occurence the dimension of the\n\
  *        secular equation problem is reduced by one.  This stage is\n\
  *        performed by the routine DLAED2.\n\
  *\n\
  *        The second stage consists of calculating the updated\n\
  *        eigenvalues. This is done by finding the roots of the secular\n\
  *        equation via the routine DLAED4 (as called by DLAED3).\n\
  *        This routine also calculates the eigenvectors of the current\n\
  *        problem.\n\
  *\n\
  *        The final stage consists of computing the updated eigenvectors\n\
  *        directly using the updated eigenvalues.  The eigenvectors for\n\
  *        the current problem are multiplied with the eigenvectors from\n\
  *        the overall problem.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  N      (input) INTEGER\n\
  *         The dimension of the symmetric tridiagonal matrix.  N >= 0.\n\
  *\n\
  *  D      (input/output) DOUBLE PRECISION array, dimension (N)\n\
  *         On entry, the eigenvalues of the rank-1-perturbed matrix.\n\
  *         On exit, the eigenvalues of the repaired matrix.\n\
  *\n\
  *  Q      (input/output) DOUBLE PRECISION array, dimension (LDQ,N)\n\
  *         On entry, the eigenvectors of the rank-1-perturbed matrix.\n\
  *         On exit, the eigenvectors of the repaired tridiagonal matrix.\n\
  *\n\
  *  LDQ    (input) INTEGER\n\
  *         The leading dimension of the array Q.  LDQ >= max(1,N).\n\
  *\n\
  *  INDXQ  (input/output) INTEGER array, dimension (N)\n\
  *         On entry, the permutation which separately sorts the two\n\
  *         subproblems in D into ascending order.\n\
  *         On exit, the permutation which will reintegrate the\n\
  *         subproblems back into sorted order,\n\
  *         i.e. D( INDXQ( I = 1, N ) ) will be in ascending order.\n\
  *\n\
  *  RHO    (input) DOUBLE PRECISION\n\
  *         The subdiagonal entry used to create the rank-1 modification.\n\
  *\n\
  *  CUTPNT (input) INTEGER\n\
  *         The location of the last eigenvalue in the leading sub-matrix.\n\
  *         min(1,N) <= CUTPNT <= N/2.\n\
  *\n\
  *  WORK   (workspace) DOUBLE PRECISION array, dimension (4*N + N**2)\n\
  *\n\
  *  IWORK  (workspace) INTEGER array, dimension (4*N)\n\
  *\n\
  *  INFO   (output) INTEGER\n\
  *          = 0:  successful exit.\n\
  *          < 0:  if INFO = -i, the i-th argument had an illegal value.\n\
  *          > 0:  if INFO = 1, an eigenvalue did not converge\n\
  *\n\n\
  *  Further Details\n\
  *  ===============\n\
  *\n\
  *  Based on contributions by\n\
  *     Jeff Rutter, Computer Science Division, University of California\n\
  *     at Berkeley, USA\n\
  *  Modified by Francoise Tisseur, University of Tennessee.\n\
  *\n\
  *  =====================================================================\n\
  *\n\
  *     .. Local Scalars ..\n      INTEGER            COLTYP, I, IDLMDA, INDX, INDXC, INDXP, IQ2, IS,\n     $                   IW, IZ, K, N1, N2, ZPP1\n\
  *     ..\n\
  *     .. External Subroutines ..\n      EXTERNAL           DCOPY, DLAED2, DLAED3, DLAMRG, XERBLA\n\
  *     ..\n\
  *     .. Intrinsic Functions ..\n      INTRINSIC          MAX, MIN\n\
  *     ..\n"
