qpSWIFT
A Sparse Quadratic Programming Solver
All Data Structures Files Functions Variables Typedefs Pages
ldl.h
1 /* ========================================================================== */
2 /* === ldl.h: include file for the LDL package ============================= */
3 /* ========================================================================== */
4 
5 /* Copyright (c) Timothy A Davis, http://www.suitesparse.com.
6 * All Rights Reserved. See LDL/Doc/License.txt for the License.
7 *
8 * Modified by Abhishek Pandala
9 * Changes Made : 1) Removed int and long versions of the code and created a single
10 * unified version
11 * 2) Added two more functions LDL_cache_numeric and LDL_row_cache_numeric
12 */
13 
14 #ifndef __LDL_H__
15 #define __LDL_H__
16 
17 #include "GlobalOptions.h"
18 
19 void LDL_symbolic(qp_int n, qp_int Ap[],
20  qp_int Ai[], qp_int Lp[],
21  qp_int Parent[], qp_int Lnz[],
22  qp_int Flag[], qp_int P[],
23  qp_int Pinv[]);
24 
25 qp_int LDL_numeric(qp_int n, qp_int Ap[],
26  qp_int Ai[], qp_real Ax[], qp_int Lp[],
27  qp_int Parent[], qp_int Lnz[],
28  qp_int Li[], qp_real Lx[], qp_real D[], qp_real Y[],
29  qp_int Pattern[], qp_int Flag[],
30  qp_int P[], qp_int Pinv[]);
31 
32 qp_int LDL_cache_numeric(qp_int n, qp_int Ap[],
33  qp_int Ai[], qp_real Ax[], qp_int Ltp[], qp_int Lti[],
34  qp_int Li[], qp_int Lp[], qp_real Lx[], qp_real D[], qp_real Y[],
35  qp_int P[], qp_int Pinv[], qp_int UPattern[]);
36 
37 
38 qp_int LDL_row_cache_numeric(qp_int n, qp_int Ap[],
39  qp_int Ai[], qp_real Ax[], qp_int Ltp[], qp_int Lti[],
40  qp_int Li[], qp_int Lp[], qp_real Lx[], qp_real D[], qp_real Y[],
41  qp_int P[], qp_int Pinv[], qp_int UPattern[]);
42 
43 void LDL_lsolve(qp_int n, qp_real X[], qp_int Lp[],
44  qp_int Li[], qp_real Lx[]);
45 
46 void LDL_dsolve(qp_int n, qp_real X[], qp_real D[]);
47 
48 void LDL_ltsolve(qp_int n, qp_real X[], qp_int Lp[],
49  qp_int Li[], qp_real Lx[]);
50 
51 void LDL_perm(qp_int n, qp_real X[], qp_real B[],
52  qp_int P[]);
53 void LDL_permt(qp_int n, qp_real X[], qp_real B[],
54  qp_int P[]);
55 
56 qp_int LDL_valid_perm(qp_int n, qp_int P[],
57  qp_int Flag[]);
58 qp_int LDL_valid_matrix(qp_int n,
59  qp_int Ap[], qp_int Ai[]);
60 
61 /* ========================================================================== */
62 /* === LDL version ========================================================== */
63 /* ========================================================================== */
64 
65 #define LDL_DATE "May 4, 2016"
66 #define LDL_VERSION_CODE(main,sub) ((main) * 1000 + (sub))
67 #define LDL_MAIN_VERSION 2
68 #define LDL_SUB_VERSION 2
69 #define LDL_SUBSUB_VERSION 6
70 #define LDL_VERSION LDL_VERSION_CODE(LDL_MAIN_VERSION,LDL_SUB_VERSION)
71 
72 #endif