/src/lib/libqt/lapack_intfc.cc
C++ | 12343 lines | 893 code | 121 blank | 11329 comment | 0 complexity | 5f62f5e55b7d33b0f1c546d75ddc1322 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- /*
- *@BEGIN LICENSE
- *
- * PSI4: an ab initio quantum chemistry software package
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *@END LICENSE
- */
- /**!
- ** \file
- ** \brief Interface to all LAPACK routines
- ** \ingroup QT
- **
- ** Autogenerated by Rob Parrish on 1/23/2011
- **
- */
- #include "qt.h"
- #include "lapack_intfc_mangle.h"
- extern "C" {
- extern int F_DBDSDC(char*, char*, int*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DBDSQR(char*, int*, int*, int*, int*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DDISNA(char*, int*, int*, double*, double*, int*);
- extern int F_DGBBRD(char*, int*, int*, int*, int*, int*, double*, int*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DGBCON(char*, int*, int*, int*, double*, int*, int*, double*, double*, double*, int*, int*);
- extern int F_DGBEQU(int*, int*, int*, int*, double*, int*, double*, double*, double*, double*, double*, int*);
- extern int F_DGBRFS(char*, int*, int*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DGBSV(int*, int*, int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DGBSVX(char*, char*, int*, int*, int*, int*, double*, int*, double*, int*, int*, char*, double*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGBTRF(int*, int*, int*, int*, double*, int*, int*, int*);
- extern int F_DGBTRS(char*, int*, int*, int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DGEBAK(char*, char*, int*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DGEBAL(char*, int*, double*, int*, int*, int*, double*, int*);
- extern int F_DGEBRD(int*, int*, double*, int*, double*, double*, double*, double*, double*, int*, int*);
- extern int F_DGECON(char*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DGEEQU(int*, int*, double*, int*, double*, double*, double*, double*, double*, int*);
- extern int F_DGEES(char*, char*, int*, double*, int*, int*, double*, double*, double*, int*, double*, int*, int*);
- extern int F_DGEESX(char*, char*, char*, int*, double*, int*, int*, double*, double*, double*, int*, double*, double*, double*, int*, int*, int*, int*);
- extern int F_DGEEV(char*, char*, int*, double*, int*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGEEVX(char*, char*, char*, char*, int*, double*, int*, double*, double*, double*, int*, double*, int*, int*, int*, double*, double*, double*, double*, double*, int*, int*, int*);
- extern int F_DGEGS(char*, char*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGEGV(char*, char*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGEHRD(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DGELQF(int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DGELS(char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGELSD(int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DGELSS(int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DGELSX(int*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*);
- extern int F_DGELSY(int*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DGEQLF(int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DGEQP3(int*, int*, double*, int*, int*, double*, double*, int*, int*);
- extern int F_DGEQPF(int*, int*, double*, int*, int*, double*, double*, int*);
- extern int F_DGEQRF(int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DGERFS(char*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DGERQF(int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DGESDD(char*, int*, int*, double*, int*, double*, double*, int*, double*, int*, double*, int*, int*, int*);
- extern int F_DGESV(int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DGESVX(char*, char*, int*, int*, double*, int*, double*, int*, int*, char*, double*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGETRF(int*, int*, double*, int*, int*, int*);
- extern int F_DGETRI(int*, double*, int*, int*, double*, int*, int*);
- extern int F_DGETRS(char*, int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DGGBAK(char*, char*, int*, int*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DGGBAL(char*, int*, double*, int*, double*, int*, int*, int*, double*, double*, double*, int*);
- extern int F_DGGES(char*, char*, char*, int*, double*, int*, double*, int*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGGESX(char*, char*, char*, char*, int*, double*, int*, double*, int*, int*, double*, double*, double*, double*, int*, double*, int*, double*, double*, double*, int*, int*, int*, int*);
- extern int F_DGGEV(char*, char*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGGEVX(char*, char*, char*, char*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, int*, int*, double*, double*, double*, double*, double*, double*, double*, int*, int*, int*);
- extern int F_DGGGLM(int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGGHRD(char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGGLSE(int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGGQRF(int*, int*, int*, double*, int*, double*, double*, int*, double*, double*, int*, int*);
- extern int F_DGGRQF(int*, int*, int*, double*, int*, double*, double*, int*, double*, double*, int*, int*);
- extern int F_DGGSVD(char*, char*, char*, int*, int*, int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DGGSVP(char*, char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, int*, double*, int*, int*, double*, double*, int*);
- extern int F_DGTCON(char*, int*, double*, double*, double*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DGTRFS(char*, int*, int*, double*, double*, double*, double*, double*, double*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DGTSV(int*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGTSVX(char*, char*, int*, int*, double*, double*, double*, double*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DGTTRF(int*, double*, double*, double*, double*, int*, int*);
- extern int F_DGTTRS(char*, int*, int*, double*, double*, double*, double*, int*, double*, int*, int*);
- extern int F_DHGEQZ(char*, char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DHSEIN(char*, char*, char*, int*, double*, int*, double*, double*, double*, int*, double*, int*, int*, int*, double*, int*, int*, int*);
- extern int F_DHSEQR(char*, char*, int*, int*, int*, double*, int*, double*, double*, double*, int*, double*, int*, int*);
- extern int F_DOPGTR(char*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DOPMTR(char*, char*, char*, int*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DORGBR(char*, int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGHR(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGLQ(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGQL(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGQR(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGRQ(int*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORGTR(char*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DORMBR(char*, char*, char*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMHR(char*, char*, int*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMLQ(char*, char*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMQL(char*, char*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMQR(char*, char*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMR3(char*, char*, int*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*);
- extern int F_DORMRQ(char*, char*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMRZ(char*, char*, int*, int*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DORMTR(char*, char*, char*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*);
- extern int F_DPBCON(char*, int*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DPBEQU(char*, int*, int*, double*, int*, double*, double*, double*, int*);
- extern int F_DPBRFS(char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DPBSTF(char*, int*, int*, double*, int*, int*);
- extern int F_DPBSV(char*, int*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DPBSVX(char*, char*, int*, int*, int*, double*, int*, double*, int*, char*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DPBTRF(char*, int*, int*, double*, int*, int*);
- extern int F_DPBTRS(char*, int*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DPOCON(char*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DPOEQU(int*, double*, int*, double*, double*, double*, int*);
- extern int F_DPORFS(char*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DPOSV(char*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DPOSVX(char*, char*, int*, int*, double*, int*, double*, int*, char*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DPOTRF(char*, int*, double*, int*, int*);
- extern int F_DPOTRI(char*, int*, double*, int*, int*);
- extern int F_DPOTRS(char*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DPPCON(char*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DPPEQU(char*, int*, double*, double*, double*, double*, int*);
- extern int F_DPPRFS(char*, int*, int*, double*, double*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DPPSV(char*, int*, int*, double*, double*, int*, int*);
- extern int F_DPPSVX(char*, char*, int*, int*, double*, double*, char*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DPPTRF(char*, int*, double*, int*);
- extern int F_DPPTRI(char*, int*, double*, int*);
- extern int F_DPPTRS(char*, int*, int*, double*, double*, int*, int*);
- extern int F_DPTCON(int*, double*, double*, double*, double*, double*, int*);
- extern int F_DPTEQR(char*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DPTRFS(int*, int*, double*, double*, double*, double*, double*, int*, double*, int*, double*, double*, double*, int*);
- extern int F_DPTSV(int*, int*, double*, double*, double*, int*, int*);
- extern int F_DPTSVX(char*, int*, int*, double*, double*, double*, double*, double*, int*, double*, int*, double*, double*, double*, double*, int*);
- extern int F_DPTTRF(int*, double*, double*, int*);
- extern int F_DPTTRS(int*, int*, double*, double*, double*, int*, int*);
- extern int F_DSBEV(char*, char*, int*, int*, double*, int*, double*, double*, int*, double*, int*);
- extern int F_DSBEVD(char*, char*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSBEVX(char*, char*, char*, int*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DSBGST(char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DSBGV(char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*);
- extern int F_DSBGVD(char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSBGVX(char*, char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DSBTRD(char*, char*, int*, int*, double*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DSGESV(int*, int*, double*, int*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DSPCON(char*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DSPEV(char*, char*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DSPEVD(char*, char*, int*, double*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSPEVX(char*, char*, char*, int*, double*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DSPGST(int*, char*, int*, double*, double*, int*);
- extern int F_DSPGV(int*, char*, char*, int*, double*, double*, double*, double*, int*, double*, int*);
- extern int F_DSPGVD(int*, char*, char*, int*, double*, double*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSPGVX(int*, char*, char*, char*, int*, double*, double*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DSPRFS(char*, int*, int*, double*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DSPSV(char*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DSPSVX(char*, char*, int*, int*, double*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DSPTRD(char*, int*, double*, double*, double*, double*, int*);
- extern int F_DSPTRF(char*, int*, double*, int*, int*);
- extern int F_DSPTRI(char*, int*, double*, int*, double*, int*);
- extern int F_DSPTRS(char*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DSTEBZ(char*, char*, int*, double*, double*, int*, int*, double*, double*, double*, int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DSTEDC(char*, int*, double*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSTEGR(char*, char*, int*, double*, double*, double*, double*, int*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*, int*);
- extern int F_DSTEIN(int*, double*, double*, int*, double*, int*, int*, double*, int*, double*, int*, int*, int*);
- extern int F_DSTEQR(char*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DSTERF(int*, double*, double*, int*);
- extern int F_DSTEV(char*, int*, double*, double*, double*, int*, double*, int*);
- extern int F_DSTEVD(char*, int*, double*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSTEVR(char*, char*, int*, double*, double*, double*, double*, int*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*, int*);
- extern int F_DSTEVX(char*, char*, int*, double*, double*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*);
- extern int F_DSYCON(char*, int*, double*, int*, int*, double*, double*, double*, int*, int*);
- extern int F_DSYEV(char*, char*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DSYEVD(char*, char*, int*, double*, int*, double*, double*, int*, int*, int*, int*);
- extern int F_DSYEVR(char*, char*, char*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*, int*);
- extern int F_DSYEVX(char*, char*, char*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSYGST(int*, char*, int*, double*, int*, double*, int*, int*);
- extern int F_DSYGV(int*, char*, char*, int*, double*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DSYGVD(int*, char*, char*, int*, double*, int*, double*, int*, double*, double*, int*, int*, int*, int*);
- extern int F_DSYGVX(int*, char*, char*, char*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, double*, double*, int*, double*, int*, int*, int*, int*);
- extern int F_DSYRFS(char*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DSYSV(char*, int*, int*, double*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DSYSVX(char*, char*, int*, int*, double*, int*, double*, int*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DSYTRD(char*, int*, double*, int*, double*, double*, double*, double*, int*, int*);
- extern int F_DSYTRF(char*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DSYTRI(char*, int*, double*, int*, int*, double*, int*);
- extern int F_DSYTRS(char*, int*, int*, double*, int*, int*, double*, int*, int*);
- extern int F_DTBCON(char*, char*, char*, int*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DTBRFS(char*, char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DTBTRS(char*, char*, char*, int*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DTGEVC(char*, char*, int*, double*, int*, double*, int*, double*, int*, double*, int*, int*, int*, double*, int*);
- extern int F_DTGEXC(int*, double*, int*, double*, int*, double*, int*, double*, int*, int*, int*, double*, int*, int*);
- extern int F_DTGSEN(int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, int*, double*, int*, int*, double*, double*, double*, double*, int*, int*, int*, int*);
- extern int F_DTGSJA(char*, char*, char*, int*, int*, int*, int*, int*, double*, int*, double*, int*, double*, double*, double*, double*, double*, int*, double*, int*, double*, int*, double*, int*, int*);
- extern int F_DTGSNA(char*, char*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*);
- extern int F_DTGSYL(char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*, int*);
- extern int F_DTPCON(char*, char*, char*, int*, double*, double*, double*, int*, int*);
- extern int F_DTPRFS(char*, char*, char*, int*, int*, double*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DTPTRI(char*, char*, int*, double*, int*);
- extern int F_DTPTRS(char*, char*, char*, int*, int*, double*, double*, int*, int*);
- extern int F_DTRCON(char*, char*, char*, int*, double*, int*, double*, double*, int*, int*);
- extern int F_DTREVC(char*, char*, int*, double*, int*, double*, int*, double*, int*, int*, int*, double*, int*);
- extern int F_DTREXC(char*, int*, double*, int*, double*, int*, int*, int*, double*, int*);
- extern int F_DTRRFS(char*, char*, char*, int*, int*, double*, int*, double*, int*, double*, int*, double*, double*, double*, int*, int*);
- extern int F_DTRSEN(char*, char*, int*, double*, int*, double*, int*, double*, double*, int*, double*, double*, double*, int*, int*, int*, int*);
- extern int F_DTRSNA(char*, char*, int*, double*, int*, double*, int*, double*, int*, double*, double*, int*, int*, double*, int*, int*, int*);
- extern int F_DTRSYL(char*, char*, int*, int*, int*, double*, int*, double*, int*, double*, int*, double*, int*);
- extern int F_DTRTRI(char*, char*, int*, double*, int*, int*);
- extern int F_DTRTRS(char*, char*, char*, int*, int*, double*, int*, double*, int*, int*);
- extern int F_DTZRQF(int*, int*, double*, int*, double*, int*);
- extern int F_DTZRZF(int*, int*, double*, int*, double*, double*, int*, int*);
- }
- namespace psi {
- /**
- * Purpose
- * =======
- *
- * DBDSDC computes the singular value decomposition (SVD) of a real
- * N-by-N (upper or lower) bidiagonal matrix B: B = U * S * VT,
- * using a divide and conquer method, where S is a diagonal matrix
- * with non-negative diagonal elements (the singular values of B), and
- * U and VT are orthogonal matrices of left and right singular vectors,
- * respectively. DBDSDC can be used to compute all singular values,
- * and optionally, singular vectors or singular vectors in compact form.
- *
- * This code makes very mild assumptions about floating point
- * arithmetic. It will work on machines with a guard digit in
- * add/subtract, or on those binary machines without guard digits
- * which subtract like the Cray X-MP, Cray Y-MP, Cray C-90, or Cray-2.
- * It could conceivably fail on hexadecimal or decimal machines
- * without guard digits, but we know of none. See DLASD3 for details.
- *
- * The code currently calls DLASDQ if singular values only are desired.
- * However, it can be slightly modified to compute singular values
- * using the divide and conquer method.
- *
- * Arguments
- * =========
- *
- * UPLO (input) CHARACTER*1
- * = 'U': B is upper bidiagonal.
- * = 'L': B is lower bidiagonal.
- *
- * COMPQ (input) CHARACTER*1
- * Specifies whether singular vectors are to be computed
- * as follows:
- * = 'N': Compute singular values only;
- * = 'P': Compute singular values and compute singular
- * vectors in compact form;
- * = 'I': Compute singular values and singular vectors.
- *
- * N (input) INTEGER
- * The order of the matrix B. N >= 0.
- *
- * D (input/output) DOUBLE PRECISION array, dimension (N)
- * On entry, the n diagonal elements of the bidiagonal matrix B.
- * On exit, if INFO=0, the singular values of B.
- *
- * E (input/output) DOUBLE PRECISION array, dimension (N-1)
- * On entry, the elements of E contain the offdiagonal
- * elements of the bidiagonal matrix whose SVD is desired.
- * On exit, E has been destroyed.
- *
- * U (output) DOUBLE PRECISION array, dimension (LDU,N)
- * If COMPQ = 'I', then:
- * On exit, if INFO = 0, U contains the left singular vectors
- * of the bidiagonal matrix.
- * For other values of COMPQ, U is not referenced.
- *
- * LDU (input) INTEGER
- * The leading dimension of the array U. LDU >= 1.
- * If singular vectors are desired, then LDU >= max( 1, N ).
- *
- * VT (output) DOUBLE PRECISION array, dimension (LDVT,N)
- * If COMPQ = 'I', then:
- * On exit, if INFO = 0, VT' contains the right singular
- * vectors of the bidiagonal matrix.
- * For other values of COMPQ, VT is not referenced.
- *
- * LDVT (input) INTEGER
- * The leading dimension of the array VT. LDVT >= 1.
- * If singular vectors are desired, then LDVT >= max( 1, N ).
- *
- * Q (output) DOUBLE PRECISION array, dimension (LDQ)
- * If COMPQ = 'P', then:
- * On exit, if INFO = 0, Q and IQ contain the left
- * and right singular vectors in a compact form,
- * requiring O(N log N) space instead of 2*N**2.
- * In particular, Q contains all the DOUBLE PRECISION data in
- * LDQ >= N*(11 + 2*SMLSIZ + 8*INT(LOG_2(N/(SMLSIZ+1))))
- * words of memory, where SMLSIZ is returned by ILAENV and
- * is equal to the maximum size of the subproblems at the
- * bottom of the computation tree (usually about 25).
- * For other values of COMPQ, Q is not referenced.
- *
- * IQ (output) INTEGER array, dimension (LDIQ)
- * If COMPQ = 'P', then:
- * On exit, if INFO = 0, Q and IQ contain the left
- * and right singular vectors in a compact form,
- * requiring O(N log N) space instead of 2*N**2.
- * In particular, IQ contains all INTEGER data in
- * LDIQ >= N*(3 + 3*INT(LOG_2(N/(SMLSIZ+1))))
- * words of memory, where SMLSIZ is returned by ILAENV and
- * is equal to the maximum size of the subproblems at the
- * bottom of the computation tree (usually about 25).
- * For other values of COMPQ, IQ is not referenced.
- *
- * WORK (workspace) DOUBLE PRECISION array, dimension (MAX(1,LWORK))
- * If COMPQ = 'N' then LWORK >= (4 * N).
- * If COMPQ = 'P' then LWORK >= (6 * N).
- * If COMPQ = 'I' then LWORK >= (3 * N**2 + 4 * N).
- *
- * IWORK (workspace) INTEGER array, dimension (8*N)
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit.
- * < 0: if INFO = -i, the i-th argument had an illegal value.
- * > 0: The algorithm failed to compute a singular value.
- * The update process of divide and conquer failed.
- *
- * Further Details
- * ===============
- *
- * Based on contributions by
- * Ming Gu and Huan Ren, Computer Science Division, University of
- * California at Berkeley, USA
- *
- * =====================================================================
- * Changed dimension statement in comment describing E from (N) to
- * (N-1). Sven, 17 Feb 05.
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DBDSDC(char uplo, char compq, int n, double* d, double* e, double* u, int ldu, double* vt, int ldvt, double* q, int* iq, double* work, int* iwork)
- {
- int info;
- ::F_DBDSDC(&uplo, &compq, &n, d, e, u, &ldu, vt, &ldvt, q, iq, work, iwork, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DBDSQR computes the singular values and, optionally, the right and/or
- * left singular vectors from the singular value decomposition (SVD) of
- * a real N-by-N (upper or lower) bidiagonal matrix B using the implicit
- * zero-shift QR algorithm. The SVD of B has the form
- *
- * B = Q * S * P**T
- *
- * where S is the diagonal matrix of singular values, Q is an orthogonal
- * matrix of left singular vectors, and P is an orthogonal matrix of
- * right singular vectors. If left singular vectors are requested, this
- * subroutine actually returns U*Q instead of Q, and, if right singular
- * vectors are requested, this subroutine returns P**T*VT instead of
- * P**T, for given real input matrices U and VT. When U and VT are the
- * orthogonal matrices that reduce a general matrix A to bidiagonal
- * form: A = U*B*VT, as computed by DGEBRD, then
- *
- * A = (U*Q) * S * (P**T*VT)
- *
- * is the SVD of A. Optionally, the subroutine may also compute Q**T*C
- * for a given real input matrix C.
- *
- * See "Computing Small Singular Values of Bidiagonal Matrices With
- * Guaranteed High Relative Accuracy," by J. Demmel and W. Kahan,
- * LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. vol. 11,
- * no. 5, pp. 873-912, Sept 1990) and
- * "Accurate singular values and differential qd algorithms," by
- * B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics
- * Department, University of California at Berkeley, July 1992
- * for a detailed description of the algorithm.
- *
- * Arguments
- * =========
- *
- * UPLO (input) CHARACTER*1
- * = 'U': B is upper bidiagonal;
- * = 'L': B is lower bidiagonal.
- *
- * N (input) INTEGER
- * The order of the matrix B. N >= 0.
- *
- * NCVT (input) INTEGER
- * The number of columns of the matrix VT. NCVT >= 0.
- *
- * NRU (input) INTEGER
- * The number of rows of the matrix U. NRU >= 0.
- *
- * NCC (input) INTEGER
- * The number of columns of the matrix C. NCC >= 0.
- *
- * D (input/output) DOUBLE PRECISION array, dimension (N)
- * On entry, the n diagonal elements of the bidiagonal matrix B.
- * On exit, if INFO=0, the singular values of B in decreasing
- * order.
- *
- * E (input/output) DOUBLE PRECISION array, dimension (N-1)
- * On entry, the N-1 offdiagonal elements of the bidiagonal
- * matrix B.
- * On exit, if INFO = 0, E is destroyed; if INFO > 0, D and E
- * will contain the diagonal and superdiagonal elements of a
- * bidiagonal matrix orthogonally equivalent to the one given
- * as input.
- *
- * VT (input/output) DOUBLE PRECISION array, dimension (LDVT, NCVT)
- * On entry, an N-by-NCVT matrix VT.
- * On exit, VT is overwritten by P**T * VT.
- * Not referenced if NCVT = 0.
- *
- * LDVT (input) INTEGER
- * The leading dimension of the array VT.
- * LDVT >= max(1,N) if NCVT > 0; LDVT >= 1 if NCVT = 0.
- *
- * U (input/output) DOUBLE PRECISION array, dimension (LDU, N)
- * On entry, an NRU-by-N matrix U.
- * On exit, U is overwritten by U * Q.
- * Not referenced if NRU = 0.
- *
- * LDU (input) INTEGER
- * The leading dimension of the array U. LDU >= max(1,NRU).
- *
- * C (input/output) DOUBLE PRECISION array, dimension (LDC, NCC)
- * On entry, an N-by-NCC matrix C.
- * On exit, C is overwritten by Q**T * C.
- * Not referenced if NCC = 0.
- *
- * LDC (input) INTEGER
- * The leading dimension of the array C.
- * LDC >= max(1,N) if NCC > 0; LDC >=1 if NCC = 0.
- *
- * WORK (workspace) DOUBLE PRECISION array, dimension (4*N)
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit
- * < 0: If INFO = -i, the i-th argument had an illegal value
- * > 0:
- * if NCVT = NRU = NCC = 0,
- * = 1, a split was marked by a positive value in E
- * = 2, current block of Z not diagonalized after 30*N
- * iterations (in inner while loop)
- * = 3, termination criterion of outer while loop not met
- * (program created more than N unreduced blocks)
- * else NCVT = NRU = NCC = 0,
- * the algorithm did not converge; D and E contain the
- * elements of a bidiagonal matrix which is orthogonally
- * similar to the input matrix B; if INFO = i, i
- * elements of E have not converged to zero.
- *
- * Internal Parameters
- * ===================
- *
- * TOLMUL DOUBLE PRECISION, default = max(10,min(100,EPS**(-1/8)))
- * TOLMUL controls the convergence criterion of the QR loop.
- * If it is positive, TOLMUL*EPS is the desired relative
- * precision in the computed singular values.
- * If it is negative, abs(TOLMUL*EPS*sigma_max) is the
- * desired absolute accuracy in the computed singular
- * values (corresponds to relative accuracy
- * abs(TOLMUL*EPS) in the largest singular value.
- * abs(TOLMUL) should be between 1 and 1/EPS, and preferably
- * between 10 (for fast convergence) and .1/EPS
- * (for there to be some accuracy in the results).
- * Default is to lose at either one eighth or 2 of the
- * available decimal digits in each computed singular value
- * (whichever is smaller).
- *
- * MAXITR INTEGER, default = 6
- * MAXITR controls the maximum number of passes of the
- * algorithm through its inner loop. The algorithms stops
- * (and so fails to converge) if the number of passes
- * through the inner loop exceeds MAXITR*N**2.
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DBDSQR(char uplo, int n, int ncvt, int nru, int ncc, double* d, double* e, double* vt, int ldvt, double* u, int ldu, double* c, int ldc, double* work)
- {
- int info;
- ::F_DBDSQR(&uplo, &n, &ncvt, &nru, &ncc, d, e, vt, &ldvt, u, &ldu, c, &ldc, work, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DDISNA computes the reciprocal condition numbers for the eigenvectors
- * of a real symmetric or complex Hermitian matrix or for the left or
- * right singular vectors of a general m-by-n matrix. The reciprocal
- * condition number is the 'gap' between the corresponding eigenvalue or
- * singular value and the nearest other one.
- *
- * The bound on the error, measured by angle in radians, in the I-th
- * computed vector is given by
- *
- * DLAMCH( 'E' ) * ( ANORM / SEP( I ) )
- *
- * where ANORM = 2-norm(A) = max( abs( D(j) ) ). SEP(I) is not allowed
- * to be smaller than DLAMCH( 'E' )*ANORM in order to limit the size of
- * the error bound.
- *
- * DDISNA may also be used to compute error bounds for eigenvectors of
- * the generalized symmetric definite eigenproblem.
- *
- * Arguments
- * =========
- *
- * JOB (input) CHARACTER*1
- * Specifies for which problem the reciprocal condition numbers
- * should be computed:
- * = 'E': the eigenvectors of a symmetric/Hermitian matrix;
- * = 'L': the left singular vectors of a general matrix;
- * = 'R': the right singular vectors of a general matrix.
- *
- * M (input) INTEGER
- * The number of rows of the matrix. M >= 0.
- *
- * N (input) INTEGER
- * If JOB = 'L' or 'R', the number of columns of the matrix,
- * in which case N >= 0. Ignored if JOB = 'E'.
- *
- * D (input) DOUBLE PRECISION array, dimension (M) if JOB = 'E'
- * dimension (min(M,N)) if JOB = 'L' or 'R'
- * The eigenvalues (if JOB = 'E') or singular values (if JOB =
- * 'L' or 'R') of the matrix, in either increasing or decreasing
- * order. If singular values, they must be non-negative.
- *
- * SEP (output) DOUBLE PRECISION array, dimension (M) if JOB = 'E'
- * dimension (min(M,N)) if JOB = 'L' or 'R'
- * The reciprocal condition numbers of the vectors.
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit.
- * < 0: if INFO = -i, the i-th argument had an illegal value.
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DDISNA(char job, int m, int n, double* d, double* sep)
- {
- int info;
- ::F_DDISNA(&job, &m, &n, d, sep, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DGBBRD reduces a real general m-by-n band matrix A to upper
- * bidiagonal form B by an orthogonal transformation: Q' * A * P = B.
- *
- * The routine computes B, and optionally forms Q or P', or computes
- * Q'*C for a given matrix C.
- *
- * Arguments
- * =========
- *
- * VECT (input) CHARACTER*1
- * Specifies whether or not the matrices Q and P' are to be
- * formed.
- * = 'N': do not form Q or P';
- * = 'Q': form Q only;
- * = 'P': form P' only;
- * = 'B': form both.
- *
- * M (input) INTEGER
- * The number of rows of the matrix A. M >= 0.
- *
- * N (input) INTEGER
- * The number of columns of the matrix A. N >= 0.
- *
- * NCC (input) INTEGER
- * The number of columns of the matrix C. NCC >= 0.
- *
- * KL (input) INTEGER
- * The number of subdiagonals of the matrix A. KL >= 0.
- *
- * KU (input) INTEGER
- * The number of superdiagonals of the matrix A. KU >= 0.
- *
- * AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N)
- * On entry, the m-by-n band matrix A, stored in rows 1 to
- * KL+KU+1. The j-th column of A is stored in the j-th column of
- * the array AB as follows:
- * AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
- * On exit, A is overwritten by values generated during the
- * reduction.
- *
- * LDAB (input) INTEGER
- * The leading dimension of the array A. LDAB >= KL+KU+1.
- *
- * D (output) DOUBLE PRECISION array, dimension (min(M,N))
- * The diagonal elements of the bidiagonal matrix B.
- *
- * E (output) DOUBLE PRECISION array, dimension (min(M,N)-1)
- * The superdiagonal elements of the bidiagonal matrix B.
- *
- * Q (output) DOUBLE PRECISION array, dimension (LDQ,M)
- * If VECT = 'Q' or 'B', the m-by-m orthogonal matrix Q.
- * If VECT = 'N' or 'P', the array Q is not referenced.
- *
- * LDQ (input) INTEGER
- * The leading dimension of the array Q.
- * LDQ >= max(1,M) if VECT = 'Q' or 'B'; LDQ >= 1 otherwise.
- *
- * PT (output) DOUBLE PRECISION array, dimension (LDPT,N)
- * If VECT = 'P' or 'B', the n-by-n orthogonal matrix P'.
- * If VECT = 'N' or 'Q', the array PT is not referenced.
- *
- * LDPT (input) INTEGER
- * The leading dimension of the array PT.
- * LDPT >= max(1,N) if VECT = 'P' or 'B'; LDPT >= 1 otherwise.
- *
- * C (input/output) DOUBLE PRECISION array, dimension (LDC,NCC)
- * On entry, an m-by-ncc matrix C.
- * On exit, C is overwritten by Q'*C.
- * C is not referenced if NCC = 0.
- *
- * LDC (input) INTEGER
- * The leading dimension of the array C.
- * LDC >= max(1,M) if NCC > 0; LDC >= 1 if NCC = 0.
- *
- * WORK (workspace) DOUBLE PRECISION array, dimension (2*max(M,N))
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit.
- * < 0: if INFO = -i, the i-th argument had an illegal value.
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DGBBRD(char vect, int m, int n, int ncc, int kl, int ku, double* ab, int ldab, double* d, double* e, double* q, int ldq, double* pt, int ldpt, double* c, int ldc, double* work)
- {
- int info;
- ::F_DGBBRD(&vect, &m, &n, &ncc, &kl, &ku, ab, &ldab, d, e, q, &ldq, pt, &ldpt, c, &ldc, work, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DGBCON estimates the reciprocal of the condition number of a real
- * general band matrix A, in either the 1-norm or the infinity-norm,
- * using the LU factorization computed by DGBTRF.
- *
- * An estimate is obtained for norm(inv(A)), and the reciprocal of the
- * condition number is computed as
- * RCOND = 1 / ( norm(A) * norm(inv(A)) ).
- *
- * Arguments
- * =========
- *
- * NORM (input) CHARACTER*1
- * Specifies whether the 1-norm condition number or the
- * infinity-norm condition number is required:
- * = '1' or 'O': 1-norm;
- * = 'I': Infinity-norm.
- *
- * N (input) INTEGER
- * The order of the matrix A. N >= 0.
- *
- * KL (input) INTEGER
- * The number of subdiagonals within the band of A. KL >= 0.
- *
- * KU (input) INTEGER
- * The number of superdiagonals within the band of A. KU >= 0.
- *
- * AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
- * Details of the LU factorization of the band matrix A, as
- * computed by DGBTRF. U is stored as an upper triangular band
- * matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
- * the multipliers used during the factorization are stored in
- * rows KL+KU+2 to 2*KL+KU+1.
- *
- * LDAB (input) INTEGER
- * The leading dimension of the array AB. LDAB >= 2*KL+KU+1.
- *
- * IPIV (input) INTEGER array, dimension (N)
- * The pivot indices; for 1 <= i <= N, row i of the matrix was
- * interchanged with row IPIV(i).
- *
- * ANORM (input) DOUBLE PRECISION
- * If NORM = '1' or 'O', the 1-norm of the original matrix A.
- * If NORM = 'I', the infinity-norm of the original matrix A.
- *
- * RCOND (output) DOUBLE PRECISION
- * The reciprocal of the condition number of the matrix A,
- * computed as RCOND = 1/(norm(A) * norm(inv(A))).
- *
- * WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
- *
- * IWORK (workspace) INTEGER array, dimension (N)
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit
- * < 0: if INFO = -i, the i-th argument had an illegal value
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DGBCON(char norm, int n, int kl, int ku, double* ab, int ldab, int* ipiv, double anorm, double* rcond, double* work, int* iwork)
- {
- int info;
- ::F_DGBCON(&norm, &n, &kl, &ku, ab, &ldab, ipiv, &anorm, rcond, work, iwork, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DGBEQU computes row and column scalings intended to equilibrate an
- * M-by-N band matrix A and reduce its condition number. R returns the
- * row scale factors and C the column scale factors, chosen to try to
- * make the largest element in each row and column of the matrix B with
- * elements B(i,j)=R(i)*A(i,j)*C(j) have absolute value 1.
- *
- * R(i) and C(j) are restricted to be between SMLNUM = smallest safe
- * number and BIGNUM = largest safe number. Use of these scaling
- * factors is not guaranteed to reduce the condition number of A but
- * works well in practice.
- *
- * Arguments
- * =========
- *
- * M (input) INTEGER
- * The number of rows of the matrix A. M >= 0.
- *
- * N (input) INTEGER
- * The number of columns of the matrix A. N >= 0.
- *
- * KL (input) INTEGER
- * The number of subdiagonals within the band of A. KL >= 0.
- *
- * KU (input) INTEGER
- * The number of superdiagonals within the band of A. KU >= 0.
- *
- * AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
- * The band matrix A, stored in rows 1 to KL+KU+1. The j-th
- * column of A is stored in the j-th column of the array AB as
- * follows:
- * AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(m,j+kl).
- *
- * LDAB (input) INTEGER
- * The leading dimension of the array AB. LDAB >= KL+KU+1.
- *
- * R (output) DOUBLE PRECISION array, dimension (M)
- * If INFO = 0, or INFO > M, R contains the row scale factors
- * for A.
- *
- * C (output) DOUBLE PRECISION array, dimension (N)
- * If INFO = 0, C contains the column scale factors for A.
- *
- * ROWCND (output) DOUBLE PRECISION
- * If INFO = 0 or INFO > M, ROWCND contains the ratio of the
- * smallest R(i) to the largest R(i). If ROWCND >= 0.1 and
- * AMAX is neither too large nor too small, it is not worth
- * scaling by R.
- *
- * COLCND (output) DOUBLE PRECISION
- * If INFO = 0, COLCND contains the ratio of the smallest
- * C(i) to the largest C(i). If COLCND >= 0.1, it is not
- * worth scaling by C.
- *
- * AMAX (output) DOUBLE PRECISION
- * Absolute value of largest matrix element. If AMAX is very
- * close to overflow or very close to underflow, the matrix
- * should be scaled.
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit
- * < 0: if INFO = -i, the i-th argument had an illegal value
- * > 0: if INFO = i, and i is
- * <= M: the i-th row of A is exactly zero
- * > M: the (i-M)-th column of A is exactly zero
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DGBEQU(int m, int n, int kl, int ku, double* ab, int ldab, double* r, double* c, double* rowcnd, double* colcnd, double* amax)
- {
- int info;
- ::F_DGBEQU(&m, &n, &kl, &ku, ab, &ldab, r, c, rowcnd, colcnd, amax, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DGBRFS improves the computed solution to a system of linear
- * equations when the coefficient matrix is banded, and provides
- * error bounds and backward error estimates for the solution.
- *
- * Arguments
- * =========
- *
- * TRANS (input) CHARACTER*1
- * Specifies the form of the system of equations:
- * = 'N': A * X = B (No transpose)
- * = 'T': A**T * X = B (Transpose)
- * = 'C': A**H * X = B (Conjugate transpose = Transpose)
- *
- * N (input) INTEGER
- * The order of the matrix A. N >= 0.
- *
- * KL (input) INTEGER
- * The number of subdiagonals within the band of A. KL >= 0.
- *
- * KU (input) INTEGER
- * The number of superdiagonals within the band of A. KU >= 0.
- *
- * NRHS (input) INTEGER
- * The number of right hand sides, i.e., the number of columns
- * of the matrices B and X. NRHS >= 0.
- *
- * AB (input) DOUBLE PRECISION array, dimension (LDAB,N)
- * The original band matrix A, stored in rows 1 to KL+KU+1.
- * The j-th column of A is stored in the j-th column of the
- * array AB as follows:
- * AB(ku+1+i-j,j) = A(i,j) for max(1,j-ku)<=i<=min(n,j+kl).
- *
- * LDAB (input) INTEGER
- * The leading dimension of the array AB. LDAB >= KL+KU+1.
- *
- * AFB (input) DOUBLE PRECISION array, dimension (LDAFB,N)
- * Details of the LU factorization of the band matrix A, as
- * computed by DGBTRF. U is stored as an upper triangular band
- * matrix with KL+KU superdiagonals in rows 1 to KL+KU+1, and
- * the multipliers used during the factorization are stored in
- * rows KL+KU+2 to 2*KL+KU+1.
- *
- * LDAFB (input) INTEGER
- * The leading dimension of the array AFB. LDAFB >= 2*KL*KU+1.
- *
- * IPIV (input) INTEGER array, dimension (N)
- * The pivot indices from DGBTRF; for 1<=i<=N, row i of the
- * matrix was interchanged with row IPIV(i).
- *
- * B (input) DOUBLE PRECISION array, dimension (LDB,NRHS)
- * The right hand side matrix B.
- *
- * LDB (input) INTEGER
- * The leading dimension of the array B. LDB >= max(1,N).
- *
- * X (input/output) DOUBLE PRECISION array, dimension (LDX,NRHS)
- * On entry, the solution matrix X, as computed by DGBTRS.
- * On exit, the improved solution matrix X.
- *
- * LDX (input) INTEGER
- * The leading dimension of the array X. LDX >= max(1,N).
- *
- * FERR (output) DOUBLE PRECISION array, dimension (NRHS)
- * The estimated forward error bound for each solution vector
- * X(j) (the j-th column of the solution matrix X).
- * If XTRUE is the true solution corresponding to X(j), FERR(j)
- * is an estimated upper bound for the magnitude of the largest
- * element in (X(j) - XTRUE) divided by the magnitude of the
- * largest element in X(j). The estimate is as reliable as
- * the estimate for RCOND, and is almost always a slight
- * overestimate of the true error.
- *
- * BERR (output) DOUBLE PRECISION array, dimension (NRHS)
- * The componentwise relative backward error of each solution
- * vector X(j) (i.e., the smallest relative change in
- * any element of A or B that makes X(j) an exact solution).
- *
- * WORK (workspace) DOUBLE PRECISION array, dimension (3*N)
- *
- * IWORK (workspace) INTEGER array, dimension (N)
- *
- * C++ Return value: INFO (output) INTEGER
- * = 0: successful exit
- * < 0: if INFO = -i, the i-th argument had an illegal value
- *
- * Internal Parameters
- * ===================
- *
- * ITMAX is the maximum number of steps of iterative refinement.
- *
- * =====================================================================
- *
- * .. Parameters ..
- **/
- int C_DGBRFS(char trans, int n, int kl, int ku, int nrhs, double* ab, int ldab, double* afb, int ldafb, int* ipiv, double* b, int ldb, double* x, int ldx, double* ferr, double* berr, double* work, int* iwork)
- {
- int info;
- ::F_DGBRFS(&trans, &n, &kl, &ku, &nrhs, ab, &ldab, afb, &ldafb, ipiv, b, &ldb, x, &ldx, ferr, berr, work, iwork, &info);
- return info;
- }
- /**
- * Purpose
- * =======
- *
- * DGBSV computes the solution to a real system of linear equations
- * A * X = B, where A is a band matrix of order N with KL subdiagonals
- * and KU superdiagonals, and X and B are N-by-NRHS matrices.
- *
- * The LU decomposition with partial pivoting and row interchanges is
- * used to factor A as A = L * U, where L is a product of permutation
- * and unit lower triangular matrices with KL subdiagonals, and U is
- * upper triangular with KL+KU superdiagonals. The factored form of A
- * is then used to solve the system of equations A * X = B.
- *
- * Arguments
- * =========
- *
- * N (input) INTEGER
- * The number of linear equations, i.e., the order of the
- * matrix A. N >= 0.
- *
- * KL (input) INTEGER
- * The number of subdiagonals within the band of A. KL >= 0.
- *
- * KU (input) INTEGER
- * The number of superdiagonals within the band of A. KU >= 0.
- *
- * NRHS (input) INTEGER
- * Theā¦
Large files files are truncated, but you can click here to view the full file