00001
00033 #ifndef _MTOOL_H_
00034 #define _MTOOL_H_
00035
00036 #include <mc/mc_base.h>
00037
00038
00039
00040
00041
00042
00043
00051 typedef struct Link {
00053 int idx;
00055 struct Link *next;
00056 } Link;
00057
00058
00066 typedef struct LinkA {
00068 int idx;
00070 double val;
00072 struct LinkA *next;
00073 } LinkA;
00074
00082 typedef struct LinkRC {
00084 int idx;
00086 struct LinkRC *next;
00087
00089 int idxT;
00091 struct LinkRC *nextT;
00092
00093 } LinkRC;
00094
00102 typedef struct LinkRCS {
00104 int idx;
00106 struct LinkRC *next;
00107
00109 int idxT;
00111 struct LinkRC *nxtT;
00112
00114 double val;
00115
00116 } LinkRCS;
00117
00125 typedef struct LinkRCN {
00127 int idx;
00129 struct LinkRC *next;
00130
00132 int idxT;
00134 struct LinkRC *nxtT;
00135
00137 double val;
00139 double valT;
00140
00141 } LinkRCN;
00142
00150 typedef enum MATformat {
00151 ZERO_FORMAT,
00152 DRC_FORMAT,
00153 ROW_FORMAT,
00154 COL_FORMAT,
00155 SLU_FORMAT,
00156 RLN_FORMAT,
00157 CLN_FORMAT,
00158 XLN_FORMAT,
00159 RFL_FORMAT,
00160 CFL_FORMAT
00161 } MATformat;
00162
00170 typedef enum MATsym {
00171 ISNOT_SYM,
00172 IS_SYM,
00173 STRUC_SYM
00174 } MATsym;
00175
00183 typedef enum MATmirror {
00184 ISNOT_MIRROR,
00185 IS_MIRROR
00186 } MATmirror;
00187
00195 typedef enum MATimpl {
00196 ISNOT_IMPL,
00197 IS_IMPL
00198 } MATimpl;
00199
00207 typedef enum MATstate {
00208 NULL_STATE,
00209 ZERO_STATE,
00210 ASSEMBLED_STATE,
00211 FACTORED_STATE
00212 } MATstate;
00213
00214
00215
00216
00217
00218
00219
00220 #if !defined(VINLINE_BAM)
00221 #else
00222 #endif
00223
00224
00244 void mPlaceit(int *IA, int *JA, double *A,
00245 int key, int i, int j, double val);
00246
00260 void mContrib(Vset *mtpool,
00261 int key, int *count, int i, int j, double val);
00262
00274 void lContrib(Vset *mtpool, int *count, int i, int j);
00275
00308 void mBuildGraphT(Vmem *vmem, int **IJAT, double **AT, int *ATnumO,
00309 int *IJA, double *A, int n, int m, int flag, int *work);
00310
00429 void buildG(Vmem *vmem, MATformat frmt, MATsym sym,
00430 int m, int n, int *numO, int *numA,
00431 int **ijb, double **b,
00432 int **ib, int **jb, double **diagb, double **offUb, double **offLb,
00433 int *ir, int *jr, double *r,
00434 int *ia, int *ja, double *a,
00435 double *diag, double *offU, double *offL,
00436 int *ip, int *jp, double *p);
00437
00438 #endif
00439
00440