11 typedef struct sparse_matrix{
21 typedef struct sparse_numerical{
43 int sp_mat_alloc(sp_mat** A,
int ncols,
int nrows,
int maxnz, ErrorMsg error_message);
44 int sp_mat_free(sp_mat *A);
45 int sp_num_alloc(sp_num** N,
int n,ErrorMsg error_message);
46 int sp_num_free(sp_num *N);
47 int reachr(sp_mat *G, sp_mat *B,
int k,
int *xik,
int *pinv);
48 void dfsr(
int j, sp_mat *G,
int *top,
int *xik,
int *pinv);
49 int sp_splsolve(sp_mat *G, sp_mat *B,
int k,
int*xik,
int top,
double *x,
int *pinv);
50 int sp_ludcmp(sp_num *N, sp_mat *A,
double pivtol);
51 int sp_lusolve(sp_num *N,
double *b,
double *x);
52 int sp_refactor(sp_num *N, sp_mat *A);
53 int column_grouping(sp_mat *G,
int *col_g,
int *col_wi);
54 int sp_amd(
int *Cp,
int *Ci,
int n,
int cnzmax,
int *P,
int *W);
55 int sp_wclear(
int mark,
int lemax,
int *w,
int n);
56 int sp_tdfs(
int j,
int k,
int *head,
const int *next,
int *post,
int *stack);
59 #define SPFLIP(i) (-(i)-2)
60 #define SPUNFLIP(i) (((i)<0) ? SPFLIP(i) : (i))
61 #define SPMARKED(w,j) (w[j] < 0)
62 #define SPMARK(w,j) {w[j] = SPFLIP(w[j]);}