--- 
:name: clatdf
:md5sum: 5c926a59b991b5455a3094fe676dfba8
:category: :subroutine
:arguments: 
- ijob: 
    :type: integer
    :intent: input
- n: 
    :type: integer
    :intent: input
- z: 
    :type: complex
    :intent: input
    :dims: 
    - ldz
    - n
- ldz: 
    :type: integer
    :intent: input
- rhs: 
    :type: complex
    :intent: input/output
    :dims: 
    - n
- rdsum: 
    :type: real
    :intent: input/output
- rdscal: 
    :type: real
    :intent: input/output
- ipiv: 
    :type: integer
    :intent: input
    :dims: 
    - n
- jpiv: 
    :type: integer
    :intent: input
    :dims: 
    - n
:substitutions: {}

:fortran_help: "      SUBROUTINE CLATDF( IJOB, N, Z, LDZ, RHS, RDSUM, RDSCAL, IPIV, JPIV )\n\n\
  *  Purpose\n\
  *  =======\n\
  *\n\
  *  CLATDF computes the contribution to the reciprocal Dif-estimate\n\
  *  by solving for x in Z * x = b, where b is chosen such that the norm\n\
  *  of x is as large as possible. It is assumed that LU decomposition\n\
  *  of Z has been computed by CGETC2. On entry RHS = f holds the\n\
  *  contribution from earlier solved sub-systems, and on return RHS = x.\n\
  *\n\
  *  The factorization of Z returned by CGETC2 has the form\n\
  *  Z = P * L * U * Q, where P and Q are permutation matrices. L is lower\n\
  *  triangular with unit diagonal elements and U is upper triangular.\n\
  *\n\n\
  *  Arguments\n\
  *  =========\n\
  *\n\
  *  IJOB    (input) INTEGER\n\
  *          IJOB = 2: First compute an approximative null-vector e\n\
  *              of Z using CGECON, e is normalized and solve for\n\
  *              Zx = +-e - f with the sign giving the greater value of\n\
  *              2-norm(x).  About 5 times as expensive as Default.\n\
  *          IJOB .ne. 2: Local look ahead strategy where\n\
  *              all entries of the r.h.s. b is choosen as either +1 or\n\
  *              -1.  Default.\n\
  *\n\
  *  N       (input) INTEGER\n\
  *          The number of columns of the matrix Z.\n\
  *\n\
  *  Z       (input) REAL array, dimension (LDZ, N)\n\
  *          On entry, the LU part of the factorization of the n-by-n\n\
  *          matrix Z computed by CGETC2:  Z = P * L * U * Q\n\
  *\n\
  *  LDZ     (input) INTEGER\n\
  *          The leading dimension of the array Z.  LDA >= max(1, N).\n\
  *\n\
  *  RHS     (input/output) REAL array, dimension (N).\n\
  *          On entry, RHS contains contributions from other subsystems.\n\
  *          On exit, RHS contains the solution of the subsystem with\n\
  *          entries according to the value of IJOB (see above).\n\
  *\n\
  *  RDSUM   (input/output) REAL\n\
  *          On entry, the sum of squares of computed contributions to\n\
  *          the Dif-estimate under computation by CTGSYL, where the\n\
  *          scaling factor RDSCAL (see below) has been factored out.\n\
  *          On exit, the corresponding sum of squares updated with the\n\
  *          contributions from the current sub-system.\n\
  *          If TRANS = 'T' RDSUM is not touched.\n\
  *          NOTE: RDSUM only makes sense when CTGSY2 is called by CTGSYL.\n\
  *\n\
  *  RDSCAL  (input/output) REAL\n\
  *          On entry, scaling factor used to prevent overflow in RDSUM.\n\
  *          On exit, RDSCAL is updated w.r.t. the current contributions\n\
  *          in RDSUM.\n\
  *          If TRANS = 'T', RDSCAL is not touched.\n\
  *          NOTE: RDSCAL only makes sense when CTGSY2 is called by\n\
  *          CTGSYL.\n\
  *\n\
  *  IPIV    (input) INTEGER array, dimension (N).\n\
  *          The pivot indices; for 1 <= i <= N, row i of the\n\
  *          matrix has been interchanged with row IPIV(i).\n\
  *\n\
  *  JPIV    (input) INTEGER array, dimension (N).\n\
  *          The pivot indices; for 1 <= j <= N, column j of the\n\
  *          matrix has been interchanged with column JPIV(j).\n\
  *\n\n\
  *  Further Details\n\
  *  ===============\n\
  *\n\
  *  Based on contributions by\n\
  *     Bo Kagstrom and Peter Poromaa, Department of Computing Science,\n\
  *     Umea University, S-901 87 Umea, Sweden.\n\
  *\n\
  *  This routine is a further developed implementation of algorithm\n\
  *  BSOLVE in [1] using complete pivoting in the LU factorization.\n\
  *\n\
  *   [1]   Bo Kagstrom and Lars Westin,\n\
  *         Generalized Schur Methods with Condition Estimators for\n\
  *         Solving the Generalized Sylvester Equation, IEEE Transactions\n\
  *         on Automatic Control, Vol. 34, No. 7, July 1989, pp 745-751.\n\
  *\n\
  *   [2]   Peter Poromaa,\n\
  *         On Efficient and Robust Estimators for the Separation\n\
  *         between two Regular Matrix Pairs with Applications in\n\
  *         Condition Estimation. Report UMINF-95.05, Department of\n\
  *         Computing Science, Umea University, S-901 87 Umea, Sweden,\n\
  *         1995.\n\
  *\n\
  *  =====================================================================\n\
  *\n"
