00001 /* _________________________________________________________________________ 00002 * 00003 * UTILIB: A utility library for developing portable C++ codes. 00004 * Copyright (c) 2001, Sandia National Laboratories. 00005 * This software is distributed under the GNU Lesser General Public License. 00006 * For more information, see the README file in the top UTILIB directory. 00007 * _________________________________________________________________________ 00008 */ 00009 00017 #include "utilib_dll.h" 00018 #include "_generic.h" 00019 00020 00021 #ifdef __cplusplus 00022 extern "C" { 00023 #endif 00024 00025 00028 UTILIB_API void dpofa_ _((double* A, int* lda, int* n, int* info)); 00029 UTILIB_API void dpoco_ _((double* A, int* lda, int* n, double* rcond, double* Z, int* info)); 00030 00031 /* A[lda, n] - Contains the symmetrix matrix whose factorization 00032 is to be computed. 00033 00034 rcond - an estimate of the reciprocal condition. 00035 Z[n] - work space 00036 info - error conditions: 00037 0 A positive definite and successfully 00038 factored 00039 K>0 Leading submatrix of order K is not 00040 positive definite. 00041 */ 00042 00043 00045 void dqrdc_ _((double* x, int* ldx, int* n, int* p, double* qraux, 00046 int* jpvt, double* work, int* job)); 00047 00048 /* x[n,p] - matrix whose QR decomposition is computed 00049 jpvt[p] - array to control pivotting 00050 work[p] - work array (not referenced if job=0) 00051 job - integer which initiates column pivotting. If 00052 job=0, pivoting is not done. 00053 00054 qraux[p] - contains info for recovering the orthogonal part 00055 of the decomposition 00056 */ 00057 00058 void dqrsl_ _((double* x, int* ldx, int* n, int* k, double* qraux, 00059 double* y, double* qy, double* qty, double* b, 00060 double* rsd, double* xb, int* job, int* info)); 00061 00062 /* x[n,p] - the output array from dqrdc 00063 qraux[p] - output from dqrdc 00064 y[n] - ?? 00065 job - determines what is to be computed 00066 a != 0 qy computed 00067 b,c,d,or e !=0 qty computed 00068 c != 0 b computed 00069 d != 0 rsd computed 00070 e != 0 xb computed 00071 00072 qy[n] - contains Qy 00073 qty[n] - contains Q'y 00074 b[p] - contains soln to ls problem |y - X_kb| 00075 rsd[n] - contains residual vector y - X_kb 00076 xb[n] - contains least squares approximation to Xb 00077 information - zero unless requested to compute B, and R is 00078 exactly singular. In that case, INFO is the 00079 index of the first zero diagonal elt of R. 00080 */ 00081 00082 /* Routine from LinPack p. 9.11 00083 The params for this command are explained above. The dqrst code 00084 automatically transforms the X matrix to column major order, 00085 so the user can treat this command like any other C routine. */ 00086 void dqrst _((double** x, int ldx, int n, int p, double* y, double tol, 00087 double* b, double* rsd, int* k, int* jpvt, double* qraux, 00088 double* work, int trans_flag)); 00089 00090 /* Adaptation of dqrst which handles multiple regression problems */ 00091 void lsfit1 _((double** x, int ldx, int n, int p, double** y, int nregs, 00092 double tol, double** b, int* k, int trans_flag)); 00093 int lsfit2 _((double** x, int ldx, int n, int p, double** y, int nregs, 00094 double tol, double** b)); 00095 int lsfit2_nr _((double** x, int ldx, int n, int p, double** y, int nregs, 00096 double tol, double** b, double* w, double** v)); 00097 00098 #ifdef __cplusplus 00099 } 00100 #endif