1 lu_int basiclu_get_factors
2 (
3     lu_int istore[],
4     double xstore[],
5     lu_int Li[],
6     double Lx[],
7     lu_int Ui[],
8     double Ux[],
9     lu_int Wi[],
10     double Wx[],
11     lu_int rowperm[],
12     lu_int colperm[],
13     lu_int Lcolptr[],
14     lu_int Lrowidx[],
15     double Lvalue[],
16     lu_int Ucolptr[],
17     lu_int Urowidx[],
18     double Uvalue[]
19 );
20 
21 /*
22 Purpose:
23 
24     Extract the row and column permutation and the LU factors. This routine can
25     be used only after basiclu_factorize() has completed and before a call to
26     basiclu_update(). At that point the factorized form of matrix B is
27 
28         B[rowperm,colperm] = L*U,
29 
30     where L is unit lower triangular and U is upper triangular. If the
31     factorization was singular (rank < m), then columns colperm[rank..m-1]
32     of B have been replaced by unit columns with entry 1 in position
33     rowperm[rank..m-1].
34 
35     basiclu_get_factors() is intended when the user needs direct access to the
36     matrix factors. It is not required to solve linear systems with the factors
37     (see basiclu_solve_dense() and basiclu_solve_sparse() instead).
38 
39 Return:
40 
41     BASICLU_ERROR_invalid_store if istore, xstore do not hold a BASICLU
42     instance. In this case xstore[BASICLU_STATUS] is not set.
43 
44     Otherwise return the status code. See xstore[BASICLU_STATUS] below.
45 
46 Arguments:
47 
48     lu_int istore[]
49     double xstore[]
50     lu_int Li[]
51     double Lx[]
52     lu_int Ui[]
53     double Ux[]
54     lu_int Wi[]
55     double Wx[]
56 
57         The BASICLU instance after basiclu_factorize() has completed.
58 
59     lu_int rowperm[m]
60 
61         Returns the row permutation. If the row permutation is not required,
62         then NULL can be passed (this is not an error).
63 
64     lu_int colperm[m]
65 
66         Returns the column permutation. If the column permutation is not
67         required, then NULL can be passed (this is not an error).
68 
69     lu_int Lcolptr[m+1]
70     lu_int Lrowidx[m+Lnz]
71     double Lvalue[m+Lnz], where Lnz = xstore[BASICLU_LNZ]
72 
73         If all three arguments are not NULL, then they are filled with L in
74         compressed column form. The indices in each column are sorted with the
75         unit diagonal element at the front.
76 
77         If any of the three arguments is NULL, then L is not returned
78         (this is not an error).
79 
80     lu_int Ucolptr[m+1]
81     lu_int Urowidx[m+Unz]
82     double Uvalue[m+Unz], where Unz = xstore[BASICLU_UNZ]
83 
84         If all three arguments are not NULL, then they are filled with U in
85         compressed column form. The indices in each column are sorted with the
86         diagonal element at the end.
87 
88         If any of the three arguments is NULL, then U is not returned
89         (this is not an error).
90 
91 Info:
92 
93     xstore[BASICLU_STATUS]: status code.
94 
95         BASICLU_OK
96 
97             The requested quantities have been returned successfully.
98 
99         BASICLU_ERROR_argument_missing
100 
101             One or more of the mandatory pointer/array arguments are NULL.
102 
103         BASICLU_ERROR_invalid_call
104 
105             The BASICLU instance does not hold a fresh factorization (either
106             basiclu_factorize() has not completed or basiclu_update() has been
107             called in the meanwhile).
108 */
109