org.netlib.lapack
Class SLASD2
java.lang.Object
org.netlib.lapack.SLASD2
public class SLASD2
 extends java.lang.Object
SLASD2 is a simplified interface to the JLAPACK routine slasd2.
This interface converts Javastyle 2D rowmajor arrays into
the 1D columnmajor linearized arrays expected by the lower
level JLAPACK routines. Using this interface also allows you
to omit offset and leading dimension arguments. However, because
of these conversions, these routines will be slower than the low
level ones. Following is the description from the original Fortran
source. Contact seymour@cs.utk.edu with any questions.
* ..
*
* Purpose
* =======
*
* SLASD2 merges the two sets of singular values together into a single
* sorted set. Then it tries to deflate the size of the problem.
* There are two ways in which deflation can occur: when two or more
* singular values are close together or if there is a tiny entry in the
* Z vector. For each such occurrence the order of the related secular
* equation problem is reduced by one.
*
* SLASD2 is called from SLASD1.
*
* Arguments
* =========
*
* NL (input) INTEGER
* The row dimension of the upper block. NL >= 1.
*
* NR (input) INTEGER
* The row dimension of the lower block. NR >= 1.
*
* SQRE (input) INTEGER
* = 0: the lower block is an NRbyNR square matrix.
* = 1: the lower block is an NRby(NR+1) rectangular matrix.
*
* The bidiagonal matrix has N = NL + NR + 1 rows and
* M = N + SQRE >= N columns.
*
* K (output) INTEGER
* Contains the dimension of the nondeflated matrix,
* This is the order of the related secular equation. 1 <= K <=N.
*
* D (input/output) REAL array, dimension(N)
* On entry D contains the singular values of the two submatrices
* to be combined. On exit D contains the trailing (NK) updated
* singular values (those which were deflated) sorted into
* increasing order.
*
* ALPHA (input) REAL
* Contains the diagonal element associated with the added row.
*
* BETA (input) REAL
* Contains the offdiagonal element associated with the added
* row.
*
* U (input/output) REAL array, dimension(LDU,N)
* On entry U contains the left singular vectors of two
* submatrices in the two square blocks with corners at (1,1),
* (NL, NL), and (NL+2, NL+2), (N,N).
* On exit U contains the trailing (NK) updated left singular
* vectors (those which were deflated) in its last NK columns.
*
* LDU (input) INTEGER
* The leading dimension of the array U. LDU >= N.
*
* Z (output) REAL array, dimension(N)
* On exit Z contains the updating row vector in the secular
* equation.
*
* DSIGMA (output) REAL array, dimension (N)
* Contains a copy of the diagonal elements (K1 singular values
* and one zero) in the secular equation.
*
* U2 (output) REAL array, dimension(LDU2,N)
* Contains a copy of the first K1 left singular vectors which
* will be used by SLASD3 in a matrix multiply (SGEMM) to solve
* for the new left singular vectors. U2 is arranged into four
* blocks. The first block contains a column with 1 at NL+1 and
* zero everywhere else; the second block contains nonzero
* entries only at and above NL; the third contains nonzero
* entries only below NL+1; and the fourth is dense.
*
* LDU2 (input) INTEGER
* The leading dimension of the array U2. LDU2 >= N.
*
* VT (input/output) REAL array, dimension(LDVT,M)
* On entry VT' contains the right singular vectors of two
* submatrices in the two square blocks with corners at (1,1),
* (NL+1, NL+1), and (NL+2, NL+2), (M,M).
* On exit VT' contains the trailing (NK) updated right singular
* vectors (those which were deflated) in its last NK columns.
* In case SQRE =1, the last row of VT spans the right null
* space.
*
* LDVT (input) INTEGER
* The leading dimension of the array VT. LDVT >= M.
*
* VT2 (output) REAL array, dimension(LDVT2,N)
* VT2' contains a copy of the first K right singular vectors
* which will be used by SLASD3 in a matrix multiply (SGEMM) to
* solve for the new right singular vectors. VT2 is arranged into
* three blocks. The first block contains a row that corresponds
* to the special 0 diagonal element in SIGMA; the second block
* contains nonzeros only at and before NL +1; the third block
* contains nonzeros only at and after NL +2.
*
* LDVT2 (input) INTEGER
* The leading dimension of the array VT2. LDVT2 >= M.
*
* IDXP (workspace) INTEGER array, dimension(N)
* This will contain the permutation used to place deflated
* values of D at the end of the array. On output IDXP(2:K)
* points to the nondeflated Dvalues and IDXP(K+1:N)
* points to the deflated singular values.
*
* IDX (workspace) INTEGER array, dimension(N)
* This will contain the permutation used to sort the contents of
* D into ascending order.
*
* IDXC (output) INTEGER array, dimension(N)
* This will contain the permutation used to arrange the columns
* of the deflated U matrix into three groups: the first group
* contains nonzero entries only at and above NL, the second
* contains nonzero entries only below NL+2, and the third is
* dense.
*
* COLTYP (workspace/output) INTEGER array, dimension(N)
* As workspace, this will contain a label which will indicate
* which of the following types a column in the U2 matrix or a
* row in the VT2 matrix is:
* 1 : nonzero in the upper half only
* 2 : nonzero in the lower half only
* 3 : dense
* 4 : deflated
*
* On exit, it is an array of dimension 4, with COLTYP(I) being
* the dimension of the Ith type columns.
*
* IDXQ (input) INTEGER array, dimension(N)
* This contains the permutation which separately sorts the two
* subproblems in D into ascending order. Note that entries in
* the first hlaf of this permutation must first be moved one
* position backward; and entries in the second half
* must first have NL+1 added to their values.
*
* INFO (output) INTEGER
* = 0: successful exit.
* < 0: if INFO = i, the ith argument had an illegal value.
*
* Further Details
* ===============
*
* Based on contributions by
* Ming Gu and Huan Ren, Computer Science Division, University of
* California at Berkeley, USA
*
* =====================================================================
*
* .. Parameters ..
Method Summary 
static void 
SLASD2(int nl,
int nr,
int sqre,
intW k,
float[] d,
float[] z,
float alpha,
float beta,
float[][] u,
float[][] vt,
float[] dsigma,
float[][] u2,
float[][] vt2,
int[] idxp,
int[] idx,
int[] idxc,
int[] idxq,
int[] coltyp,
intW info)

Methods inherited from class java.lang.Object 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
SLASD2
public SLASD2()
SLASD2
public static void SLASD2(int nl,
int nr,
int sqre,
intW k,
float[] d,
float[] z,
float alpha,
float beta,
float[][] u,
float[][] vt,
float[] dsigma,
float[][] u2,
float[][] vt2,
int[] idxp,
int[] idx,
int[] idxc,
int[] idxq,
int[] coltyp,
intW info)