examples/homography/TooN/lapack.h

00001 
00002 /*                       
00003          Copyright (C) 2005 Tom Drummond
00004 
00005      This library is free software; you can redistribute it and/or
00006      modify it under the terms of the GNU Lesser General Public
00007      License as published by the Free Software Foundation; either
00008      version 2.1 of the License, or (at your option) any later version.
00009 
00010      This library is distributed in the hope that it will be useful,
00011      but WITHOUT ANY WARRANTY; without even the implied warranty of
00012      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013      Lesser General Public License for more details.
00014 
00015      You should have received a copy of the GNU Lesser General Public
00016      License along with this library; if not, write to the Free Software
00017      Foundation, Inc.
00018      51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00019 */
00020 #ifndef __LAPACK_H
00021 #define __LAPACK_H
00022 
00023 // LAPACK and BLAS routines
00024 
00025 #ifndef TOON_NO_NAMESPACE
00026 namespace TooN {
00027 #endif 
00028 
00029 extern "C" {
00030   // LU decomoposition of a general matrix
00031   void dgetrf_(int* M, int *N, double* A, int* lda, int* IPIV, int* INFO);
00032 
00033   // generate inverse of a matrix given its LU decomposition
00034   void dgetri_(int* N, double* A, int* lda, int* IPIV, double* WORK, int* lwork, int* INFO);
00035 
00036   // inverse of a triangular matrix * a vector (BLAS level 2)
00037   void dtrsm_(char* SIDE, char* UPLO, char* TRANSA, char* DIAG, int* M, int* N, double* alpha, double* A, int* lda, double* B, int* ldb);
00038 
00039   // SVD of a general matrix of doubles
00040   void dgesvd_(char* JOBU, char* JOBVT, int* M, int *N, double* A, int* lda,
00041                double* S, double *U, int* ldu, double* VT, int* ldvt,
00042                double* WORK, int* lwork, int* INFO);
00043 
00044   // Eigen decomposition of a symmetric matrix of doubles
00045   void dsyev_(char* JOBZ, char* UPLO, int* N, double* A, int* lda, double* W,
00046               double* WORK, int* LWORK, int* INFO);
00047 
00048     // Cholesky decomposition
00049     void dpotrf_(const char* UPLO, const int* N, double* A, const int* LDA, int* INFO);
00050 
00051     // Cholesky solve AX=B given decomposition
00052     void dpotrs_(const char* UPLO, const int* N, const int* NRHS, const double* A, const int* LDA, double* B, const int* LDB, int* INFO);
00053 
00054     // Cholesky inverse given decomposition
00055     void dpotri_(const char* UPLO, const int* N, double* A, const int* LDA, int* INFO);
00056 }
00057 
00058 
00059 #ifndef TOON_NO_NAMESPACE
00060 }
00061 #endif 
00062 
00063 
00064 
00065 #endif

Generated on Fri Feb 22 18:26:54 2008 for QVision by  doxygen 1.5.3