--- 
:name: dhsein
:md5sum: f1f28c22000db86e9f2f6f69e7dba216
:category: :subroutine
:arguments: 
- side: 
    :type: char
    :intent: input
- eigsrc: 
    :type: char
    :intent: input
- initv: 
    :type: char
    :intent: input
- select: 
    :type: logical
    :intent: input/output
    :dims: 
    - n
- n: 
    :type: integer
    :intent: input
- h: 
    :type: doublereal
    :intent: input
    :dims: 
    - ldh
    - n
- ldh: 
    :type: integer
    :intent: input
- wr: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - n
- wi: 
    :type: doublereal
    :intent: input
    :dims: 
    - n
- vl: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - ldvl
    - mm
- ldvl: 
    :type: integer
    :intent: input
- vr: 
    :type: doublereal
    :intent: input/output
    :dims: 
    - ldvr
    - mm
- ldvr: 
    :type: integer
    :intent: input
- mm: 
    :type: integer
    :intent: input
- m: 
    :type: integer
    :intent: output
- work: 
    :type: doublereal
    :intent: workspace
    :dims: 
    - (n+2)*n
- ifaill: 
    :type: integer
    :intent: output
    :dims: 
    - mm
- ifailr: 
    :type: integer
    :intent: output
    :dims: 
    - mm
- info: 
    :type: integer
    :intent: output
:substitutions: {}

:fortran_help: "      SUBROUTINE DHSEIN( SIDE, EIGSRC, INITV, SELECT, N, H, LDH, WR, WI, VL, LDVL, VR, LDVR, MM, M, WORK, IFAILL, IFAILR, INFO )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  DHSEIN uses inverse iteration to find specified right and/or left\n\
  *  eigenvectors of a real upper Hessenberg matrix H.\n\
  *\n\
  *  The right eigenvector x and the left eigenvector y of the matrix H\n\
  *  corresponding to an eigenvalue w are defined by:\n\
  *\n\
  *               H * x = w * x,     y**h * H = w * y**h\n\
  *\n\
  *  where y**h denotes the conjugate transpose of the vector y.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  SIDE    (input) CHARACTER*1\n\
  *          = 'R': compute right eigenvectors only;\n\
  *          = 'L': compute left eigenvectors only;\n\
  *          = 'B': compute both right and left eigenvectors.\n\
  *\n\
  *  EIGSRC  (input) CHARACTER*1\n\
  *          Specifies the source of eigenvalues supplied in (WR,WI):\n\
  *          = 'Q': the eigenvalues were found using DHSEQR; thus, if\n\
  *                 H has zero subdiagonal elements, and so is\n\
  *                 block-triangular, then the j-th eigenvalue can be\n\
  *                 assumed to be an eigenvalue of the block containing\n\
  *                 the j-th row/column.  This property allows DHSEIN to\n\
  *                 perform inverse iteration on just one diagonal block.\n\
  *          = 'N': no assumptions are made on the correspondence\n\
  *                 between eigenvalues and diagonal blocks.  In this\n\
  *                 case, DHSEIN must always perform inverse iteration\n\
  *                 using the whole matrix H.\n\
  *\n\
  *  INITV   (input) CHARACTER*1\n\
  *          = 'N': no initial vectors are supplied;\n\
  *          = 'U': user-supplied initial vectors are stored in the arrays\n\
  *                 VL and/or VR.\n\
  *\n\
  *  SELECT  (input/output) LOGICAL array, dimension (N)\n\
  *          Specifies the eigenvectors to be computed. To select the\n\
  *          real eigenvector corresponding to a real eigenvalue WR(j),\n\
  *          SELECT(j) must be set to .TRUE.. To select the complex\n\
  *          eigenvector corresponding to a complex eigenvalue\n\
  *          (WR(j),WI(j)), with complex conjugate (WR(j+1),WI(j+1)),\n\
  *          either SELECT(j) or SELECT(j+1) or both must be set to\n\
  *          .TRUE.; then on exit SELECT(j) is .TRUE. and SELECT(j+1) is\n\
  *          .FALSE..\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The order of the matrix H.  N >= 0.\n\
  *\n\
  *  H       (input) DOUBLE PRECISION array, dimension (LDH,N)\n\
  *          The upper Hessenberg matrix H.\n\
  *\n\
  *  LDH     (input) INTEGER\n\
  *          The leading dimension of the array H.  LDH >= max(1,N).\n\
  *\n\
  *  WR      (input/output) DOUBLE PRECISION array, dimension (N)\n\
  *  WI      (input) DOUBLE PRECISION array, dimension (N)\n\
  *          On entry, the real and imaginary parts of the eigenvalues of\n\
  *          H; a complex conjugate pair of eigenvalues must be stored in\n\
  *          consecutive elements of WR and WI.\n\
  *          On exit, WR may have been altered since close eigenvalues\n\
  *          are perturbed slightly in searching for independent\n\
  *          eigenvectors.\n\
  *\n\
  *  VL      (input/output) DOUBLE PRECISION array, dimension (LDVL,MM)\n\
  *          On entry, if INITV = 'U' and SIDE = 'L' or 'B', VL must\n\
  *          contain starting vectors for the inverse iteration for the\n\
  *          left eigenvectors; the starting vector for each eigenvector\n\
  *          must be in the same column(s) in which the eigenvector will\n\
  *          be stored.\n\
  *          On exit, if SIDE = 'L' or 'B', the left eigenvectors\n\
  *          specified by SELECT will be stored consecutively in the\n\
  *          columns of VL, in the same order as their eigenvalues. A\n\
  *          complex eigenvector corresponding to a complex eigenvalue is\n\
  *          stored in two consecutive columns, the first holding the real\n\
  *          part and the second the imaginary part.\n\
  *          If SIDE = 'R', VL is not referenced.\n\
  *\n\
  *  LDVL    (input) INTEGER\n\
  *          The leading dimension of the array VL.\n\
  *          LDVL >= max(1,N) if SIDE = 'L' or 'B'; LDVL >= 1 otherwise.\n\
  *\n\
  *  VR      (input/output) DOUBLE PRECISION array, dimension (LDVR,MM)\n\
  *          On entry, if INITV = 'U' and SIDE = 'R' or 'B', VR must\n\
  *          contain starting vectors for the inverse iteration for the\n\
  *          right eigenvectors; the starting vector for each eigenvector\n\
  *          must be in the same column(s) in which the eigenvector will\n\
  *          be stored.\n\
  *          On exit, if SIDE = 'R' or 'B', the right eigenvectors\n\
  *          specified by SELECT will be stored consecutively in the\n\
  *          columns of VR, in the same order as their eigenvalues. A\n\
  *          complex eigenvector corresponding to a complex eigenvalue is\n\
  *          stored in two consecutive columns, the first holding the real\n\
  *          part and the second the imaginary part.\n\
  *          If SIDE = 'L', VR is not referenced.\n\
  *\n\
  *  LDVR    (input) INTEGER\n\
  *          The leading dimension of the array VR.\n\
  *          LDVR >= max(1,N) if SIDE = 'R' or 'B'; LDVR >= 1 otherwise.\n\
  *\n\
  *  MM      (input) INTEGER\n\
  *          The number of columns in the arrays VL and/or VR. MM >= M.\n\
  *\n\
  *  M       (output) INTEGER\n\
  *          The number of columns in the arrays VL and/or VR required to\n\
  *          store the eigenvectors; each selected real eigenvector\n\
  *          occupies one column and each selected complex eigenvector\n\
  *          occupies two columns.\n\
  *\n\
  *  WORK    (workspace) DOUBLE PRECISION array, dimension ((N+2)*N)\n\
  *\n\
  *  IFAILL  (output) INTEGER array, dimension (MM)\n\
  *          If SIDE = 'L' or 'B', IFAILL(i) = j > 0 if the left\n\
  *          eigenvector in the i-th column of VL (corresponding to the\n\
  *          eigenvalue w(j)) failed to converge; IFAILL(i) = 0 if the\n\
  *          eigenvector converged satisfactorily. If the i-th and (i+1)th\n\
  *          columns of VL hold a complex eigenvector, then IFAILL(i) and\n\
  *          IFAILL(i+1) are set to the same value.\n\
  *          If SIDE = 'R', IFAILL is not referenced.\n\
  *\n\
  *  IFAILR  (output) INTEGER array, dimension (MM)\n\
  *          If SIDE = 'R' or 'B', IFAILR(i) = j > 0 if the right\n\
  *          eigenvector in the i-th column of VR (corresponding to the\n\
  *          eigenvalue w(j)) failed to converge; IFAILR(i) = 0 if the\n\
  *          eigenvector converged satisfactorily. If the i-th and (i+1)th\n\
  *          columns of VR hold a complex eigenvector, then IFAILR(i) and\n\
  *          IFAILR(i+1) are set to the same value.\n\
  *          If SIDE = 'L', IFAILR is not referenced.\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 = i, i is the number of eigenvectors which\n\
  *                failed to converge; see IFAILL and IFAILR for further\n\
  *                details.\n\
  *\n\n\
  *  Further Details\n\
  *  ===============\n\
  *\n\
  *  Each eigenvector is normalized so that the element of largest\n\
  *  magnitude has magnitude 1; here the magnitude of a complex number\n\
  *  (x,y) is taken to be |x|+|y|.\n\
  *\n\
  *  =====================================================================\n\
  *\n"
