PARP Research Group University of Murcia, Spain


src/qvmath/qvmatrixalgebra.h

00001 /*
00002  *      Copyright (C) 2007, 2008. PARP Research Group.
00003  *      <http://perception.inf.um.es>
00004  *      University of Murcia, Spain.
00005  *
00006  *      This file is part of the QVision library.
00007  *
00008  *      QVision is free software: you can redistribute it and/or modify
00009  *      it under the terms of the GNU Lesser General Public License as
00010  *      published by the Free Software Foundation, version 3 of the License.
00011  *
00012  *      QVision is distributed in the hope that it will be useful,
00013  *      but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *      GNU Lesser General Public License for more details.
00016  *
00017  *      You should have received a copy of the GNU Lesser General Public
00018  *      License along with QVision. If not, see <http://www.gnu.org/licenses/>.
00019  */
00020 
00024 
00025 #ifndef QMATRIXALGEBRA_H
00026 #define QMATRIXALGEBRA_H
00027 
00028 #include <QVector>
00029 #include <QVMatrix>
00030 
00040 void singularValueDecomposition(const QVMatrix &M, QVMatrix &U, QVMatrix &V, QVMatrix &S);
00041 
00052 void LUDecomposition(const QVMatrix &M, QVMatrix &L, QVMatrix &U, QVMatrix &P);
00053 
00061 void CholeskyDecomposition(const QVMatrix &M, QVMatrix &L);
00062 
00071 void QRDecomposition(const QVMatrix &M, QVMatrix &Q, QVMatrix &R);
00072 
00079 QVMatrix pseudoInverse(const QVMatrix &M);
00080 
00089 void eigenDecomposition(const QVMatrix &M, QVVector &eigVals, QVMatrix &eigVecs);
00090 
00098 double determinant(const QVMatrix &M);
00099 
00111 double BhattacharyyaDistance(const QVVector &m1, const QVMatrix &S1, const QVVector &m2, const QVMatrix &S2);
00112 
00121 void solveLinear(const QVMatrix &A, QVVector &x, const QVVector &b);
00122 
00131 void solveLinear(const QVMatrix &A, QVMatrix &X, const QVMatrix &B);
00132 
00142 void solveOverDetermined(const QVMatrix &A, QVMatrix &X, const QVMatrix &B);
00143 
00151 void solveHomogeneousLinear(const QVMatrix &A, QVector<double> &x);
00152 
00154 void solveHomogeneousLinear2(const QVMatrix &A, QVector<double> &x);
00155 
00157 double homogLineFromMoments(double x,double y,double xx,double xy,double yy,double &a,double &b,double &c);
00158 
00160 QVVector regressionLine(const QVMatrix &points);
00161 
00162 #endif



QVision framework. PARP research group, copyright 2007, 2008.