Debian Codegraph @

tools/physicalModeling/mesh2faust/vega/libraries/include/matrixLAPACK.h

raw symbols SCIP
1 /*************************************************************************
2 * *
3 * Vega FEM Simulation Library Version 3.1 *
4 * *
5 * "matrix" library , Copyright (C) 2007 CMU, 2009 MIT *
6 * All rights reserved. *
7 * *
8 * Code author: Jernej Barbic *
9 * http://www.jernejbarbic.com/code *
10 * Research: Jernej Barbic, Doug L. James, Jovan Popovic *
11 * Funding: NSF, Link Foundation, Singapore-MIT GAMBIT Game Lab *
12 * *
13 * This library is free software; you can redistribute it and/or *
14 * modify it under the terms of the BSD-style license that is *
15 * included with this library in the file LICENSE.txt *
16 * *
17 * This library is distributed in the hope that it will be useful, *
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file *
20 * LICENSE.TXT for more details. *
21 * *
22 *************************************************************************/
23
24 /*
25 Wrapper to matrix LAPACK routines.
26 See also matrix.h.
27 */
28
29 #ifndef _MATRIX_LAPACK_H_
30 #define _MATRIX_LAPACK_H_
31
32 #include <stdlib.h>
33
34 template<class real>
35 real * InverseMatrix(int m, real * mtx, real * output = NULL);
36
37 template<class real>
38 real * PseudoInverseMatrix(int m, int n, real * mtx, real singularValueThreshold = 1e-6, int * rank = NULL, real * output = NULL);
39
40 template<class real>
41 real * MatrixLeastSquareSolve(int m, int n, int nRhs, real * mtx, real * b, real rcond, int * rank = NULL, real * output = NULL);
42
43 template<class real>
44 void MatrixLUSolve(int n, int nRhs, real * mtx, real * x, real * b);
45
46 // mtx * x = lambda * x
47 template<class real>
48 void SymmetricMatrixEigenDecomposition(int m, real * mtx, real * Q, real * Lambda);
49
50 // mtx * x = lambda * mtx2 * x
51 // Warning: mtx2 will be modified after this function call.
52 template<class real>
53 void SymmetricMatrixGeneralEigenDecomposition(int m, real * mtx, real * mtx2, real * Q, real * Lambda);
54
55 // mtx * x = lambda * x
56 template<class real>
57 int MatrixEigenDecomposition(int m, real * mtx, real * EigenVectors, real * LambdaRe, real * LambdaIm);
58
59 // U is m x MIN(m,n)
60 // Sigma is a MIN(m,n) vector
61 // VT is MIN(m,n) x n
62 template<class real>
63 void MatrixSVD(int m, int n, real * mtx, real * U, real * Sigma, real * VT);
64
65 #endif
66