PLearn 0.1
|
00001 // -*- C++ -*- 00002 00003 // PLearn (A C++ Machine Learning Library) 00004 // Copyright (C) 2002 Pascal Vincent 00005 // 00006 00007 // Redistribution and use in source and binary forms, with or without 00008 // modification, are permitted provided that the following conditions are met: 00009 // 00010 // 1. Redistributions of source code must retain the above copyright 00011 // notice, this list of conditions and the following disclaimer. 00012 // 00013 // 2. Redistributions in binary form must reproduce the above copyright 00014 // notice, this list of conditions and the following disclaimer in the 00015 // documentation and/or other materials provided with the distribution. 00016 // 00017 // 3. The name of the authors may not be used to endorse or promote 00018 // products derived from this software without specific prior written 00019 // permission. 00020 // 00021 // THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXRESS OR 00022 // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 00023 // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN 00024 // NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 00025 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED 00026 // TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00027 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00028 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00029 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00030 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00031 // 00032 // This file is part of the PLearn library. For more information on the PLearn 00033 // library, go to the PLearn Web site at www.plearn.org 00034 00035 00036 #ifndef lapack_proto_INC 00037 #define lapack_proto_INC 00038 00039 namespace PLearn { 00040 using namespace std; 00041 00042 extern "C" { 00043 00044 void ssyevx_(char* JOBZ, char* RANGE, char* UPLO, int* N, float* A, int* LDA, float* VL, float* VU, int* IL, int* IU, float* ABSTOL, int* M, float* W, float* Z, int* LDZ, float* WORK, int* LWORK, int* IWORK, int* IFAIL, int* INFO); 00045 void dsyevx_(char* JOBZ, char* RANGE, char* UPLO, int* N, double* A, int* LDA, double* VL, double* VU, int* IL, int* IU, double* ABSTOL, int* M, double* W, double* Z, int* LDZ, double* WORK, int* LWORK, int* IWORK, int* IFAIL, int* INFO); 00046 00047 void ssyev_(char* JOBZ, char* UPLO, int* N, float* A, int* LDA, float* W, float* WORK, int* LWORK, int* INFO); 00048 void dsyev_(char* JOBZ, char* UPLO, int* N, double* A, int* LDA, double* W, double* WORK, int* LWORK, int* INFO); 00049 00050 void sgetri_(int* N, float* A, int* LDA, int* IPIV, float* WORK, int* LWORK, int* INFO); 00051 void dgetri_(int* N, double* A, int* LDA, int* IPIV, double* WORK, int* LWORK, int* INFO); 00052 00053 void sgetrf_(int* M, int* N, float* A, int* LDA, int* IPIV, int* INFO); 00054 void dgetrf_(int* M, int* N, double* A, int* LDA, int* IPIV, int* INFO); 00055 00056 void sgesv_(int* N, int* NRHS, float* A, int* LDA, int* IPIV, float* B, int* LDB, int* INFO); 00057 void dgesv_(int* N, int* NRHS, double* A, int* LDA, int* IPIV, double* B, int* LDB, int* INFO); 00058 00059 void sgesdd_(char* JOBZ, int* M, int* N, float* A, int* LDA, 00060 float* S, float* U, int* LDU, float* VT, int* LDVT, 00061 float* WORK, int* LWORK, int* IWORK, int* INFO); 00062 void dgesdd_(char* JOBZ, int* M, int* N, double* A, int* LDA, 00063 double* S, double* U, int* LDU, double* VT, int* LDVT, 00064 double* WORK, int* LWORK, int* IWORK, int* INFO); 00065 00066 void ssyevr_(char* JOBZ, char* RANGE, char* UPLO, int* N, 00067 float* A, int* LDA, float* VL, float* VU, 00068 int* IL, int* IU, float* ABSTOL, int* M, float* W, 00069 float* Z, int* LDZ, int* ISUPPZ, float* WORK, 00070 int* LWORK, int* IWORK, int* LIWORK, int* INFO); 00071 void dsyevr_(char* JOBZ, char* RANGE, char* UPLO, int* N, 00072 double* A, int* LDA, double* VL, double* VU, 00073 int* IL, int* IU, double* ABSTOL, int* M, double* W, 00074 double* Z, int* LDZ, int* ISUPPZ, double* WORK, 00075 int* LWORK, int* IWORK, int* LIWORK, int* INFO); 00076 00077 void ssygvx_(int* ITYPE, char* JOBZ, char* RANGE, char* UPLO, int* N, float* A, int* LDA, float* B, int* LDB, float* VL, float* VU, int* IL, int* IU, float* ABSTOL, int* M, float* W, float* Z, int* LDZ, float* WORK, int* LWORK, int* IWORK, int* IFAIL, int* INFO); 00078 void dsygvx_(int* ITYPE, char* JOBZ, char* RANGE, char* UPLO, int* N, double* A, int* LDA, double* B, int* LDB, double* VL, double* VU, int* IL, int* IU, double* ABSTOL, int* M, double* W, double* Z, int* LDZ, double* WORK, int* LWORK, int* IWORK, int* IFAIL, int* INFO); 00079 00080 // Cholesky Decomposition 00081 void spotrf_(char* UPLO, int* N, float* A, int* LDA, int* INFO); 00082 void dpotrf_(char* UPLO, int* N, double* A, int* LDA, int* INFO); 00083 00084 // Solve linear system given Cholesky Decomposition 00085 void spotrs_(char* UPLO, int* N, int* NRHS, float* A, int* LDA, float* B, int* LDB, int* INFO); 00086 void dpotrs_(char* UPLO, int* N, int* NRHS, double* A, int* LDA, double* B, int* LDB, int* INFO); 00087 00088 // Expert driver for factorising and solving through Cholesky (and estimate 00089 // condition number, equilibrate, etc.) 00090 void sposvx_(char* FACT, char* UPLO, int* N, int* NRHS, float* A, int* LDA, 00091 float* AF, int* LDAF, char* EQUED, float* S, float* B, int* LDB, 00092 float* X, int* LDX, float* RCOND, float* FERR, float* BERR, 00093 float* WORK, int* IWORK, int* INFO); 00094 void dposvx_(char* FACT, char* UPLO, int* N, int* NRHS, double* A, int* LDA, 00095 double* AF, int* LDAF, char* EQUED, double* S, double* B, int* LDB, 00096 double* X, int* LDX, double* RCOND, double* FERR, double* BERR, 00097 double* WORK, int* IWORK, int* INFO); 00098 } 00099 00100 } // end of namespace PLearn 00101 00102 00103 #endif 00104 00105 00106 /* 00107 Local Variables: 00108 mode:c++ 00109 c-basic-offset:4 00110 c-file-style:"stroustrup" 00111 c-file-offsets:((innamespace . 0)(inline-open . 0)) 00112 indent-tabs-mode:nil 00113 fill-column:79 00114 End: 00115 */ 00116 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=79 :