|
kusano |
7d535a |
|
|
kusano |
7d535a |
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
|
|
kusano |
7d535a |
<title>SuperLU: SRC/colamd.h Source File</title>
|
|
kusano |
7d535a |
<link href="doxygen.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
<link href="tabs.css" rel="stylesheet" type="text/css">
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
Main Page
|
|
kusano |
7d535a |
Data Structures
|
|
kusano |
7d535a |
Files
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
SRC/colamd.hGo to the documentation of this file.
|
|
kusano |
7d535a |
00055 #ifndef COLAMD_H
|
|
kusano |
7d535a |
00056 #define COLAMD_H
|
|
kusano |
7d535a |
00057
|
|
kusano |
7d535a |
00058
|
|
kusano |
7d535a |
00059
|
|
kusano |
7d535a |
00060
|
|
kusano |
7d535a |
00061
|
|
kusano |
7d535a |
00062 #include <stdlib.h>
|
|
kusano |
7d535a |
00063
|
|
kusano |
7d535a |
00064
|
|
kusano |
7d535a |
00065
|
|
kusano |
7d535a |
00066
|
|
kusano |
7d535a |
00067
|
|
kusano |
7d535a |
00068
|
|
kusano |
7d535a |
00069 #define COLAMD_KNOBS 20
|
|
kusano |
7d535a |
00070
|
|
kusano |
7d535a |
00071
|
|
kusano |
7d535a |
00072 #define COLAMD_STATS 20
|
|
kusano |
7d535a |
00073
|
|
kusano |
7d535a |
00074
|
|
kusano |
7d535a |
00075 #define COLAMD_DENSE_ROW 0
|
|
kusano |
7d535a |
00076
|
|
kusano |
7d535a |
00077
|
|
kusano |
7d535a |
00078 #define COLAMD_DENSE_COL 1
|
|
kusano |
7d535a |
00079
|
|
kusano |
7d535a |
00080
|
|
kusano |
7d535a |
00081 #define COLAMD_DEFRAG_COUNT 2
|
|
kusano |
7d535a |
00082
|
|
kusano |
7d535a |
00083
|
|
kusano |
7d535a |
00084 #define COLAMD_STATUS 3
|
|
kusano |
7d535a |
00085
|
|
kusano |
7d535a |
00086
|
|
kusano |
7d535a |
00087 #define COLAMD_INFO1 4
|
|
kusano |
7d535a |
00088 #define COLAMD_INFO2 5
|
|
kusano |
7d535a |
00089 #define COLAMD_INFO3 6
|
|
kusano |
7d535a |
00090
|
|
kusano |
7d535a |
00091
|
|
kusano |
7d535a |
00092 #define COLAMD_OK (0)
|
|
kusano |
7d535a |
00093 #define COLAMD_OK_BUT_JUMBLED (1)
|
|
kusano |
7d535a |
00094 #define COLAMD_ERROR_A_not_present (-1)
|
|
kusano |
7d535a |
00095 #define COLAMD_ERROR_p_not_present (-2)
|
|
kusano |
7d535a |
00096 #define COLAMD_ERROR_nrow_negative (-3)
|
|
kusano |
7d535a |
00097 #define COLAMD_ERROR_ncol_negative (-4)
|
|
kusano |
7d535a |
00098 #define COLAMD_ERROR_nnz_negative (-5)
|
|
kusano |
7d535a |
00099 #define COLAMD_ERROR_p0_nonzero (-6)
|
|
kusano |
7d535a |
00100 #define COLAMD_ERROR_A_too_small (-7)
|
|
kusano |
7d535a |
00101 #define COLAMD_ERROR_col_length_negative (-8)
|
|
kusano |
7d535a |
00102 #define COLAMD_ERROR_row_index_out_of_bounds (-9)
|
|
kusano |
7d535a |
00103 #define COLAMD_ERROR_out_of_memory (-10)
|
|
kusano |
7d535a |
00104 #define COLAMD_ERROR_internal_error (-999)
|
|
kusano |
7d535a |
00105
|
|
kusano |
7d535a |
00106
|
|
kusano |
7d535a |
00107
|
|
kusano |
7d535a |
00108
|
|
kusano |
7d535a |
00109
|
|
kusano |
7d535a |
00110
|
|
kusano |
7d535a |
00111
|
|
kusano |
7d535a |
00112
|
|
kusano |
7d535a |
00113
|
|
kusano |
7d535a |
00114 typedef struct Colamd_Col_struct
|
|
kusano |
7d535a |
00115 {
|
|
kusano |
7d535a |
00116 int start ;
|
|
kusano |
7d535a |
00117
|
|
kusano |
7d535a |
00118 int length ;
|
|
kusano |
7d535a |
00119 union
|
|
kusano |
7d535a |
00120 {
|
|
kusano |
7d535a |
00121 int thickness ;
|
|
kusano |
7d535a |
00122
|
|
kusano |
7d535a |
00123 int parent ;
|
|
kusano |
7d535a |
00124
|
|
kusano |
7d535a |
00125 } shared1 ;
|
|
kusano |
7d535a |
00126 union
|
|
kusano |
7d535a |
00127 {
|
|
kusano |
7d535a |
00128 int score ;
|
|
kusano |
7d535a |
00129 int order ;
|
|
kusano |
7d535a |
00130 } shared2 ;
|
|
kusano |
7d535a |
00131 union
|
|
kusano |
7d535a |
00132 {
|
|
kusano |
7d535a |
00133 int headhash ;
|
|
kusano |
7d535a |
00134
|
|
kusano |
7d535a |
00135 int hash ;
|
|
kusano |
7d535a |
00136 int prev ;
|
|
kusano |
7d535a |
00137
|
|
kusano |
7d535a |
00138 } shared3 ;
|
|
kusano |
7d535a |
00139 union
|
|
kusano |
7d535a |
00140 {
|
|
kusano |
7d535a |
00141 int degree_next ;
|
|
kusano |
7d535a |
00142 int hash_next ;
|
|
kusano |
7d535a |
00143 } shared4 ;
|
|
kusano |
7d535a |
00144
|
|
kusano |
7d535a |
00145 } Colamd_Col ;
|
|
kusano |
7d535a |
00146
|
|
kusano |
7d535a |
00147 typedef struct Colamd_Row_struct
|
|
kusano |
7d535a |
00148 {
|
|
kusano |
7d535a |
00149 int start ;
|
|
kusano |
7d535a |
00150 int length ;
|
|
kusano |
7d535a |
00151 union
|
|
kusano |
7d535a |
00152 {
|
|
kusano |
7d535a |
00153 int degree ;
|
|
kusano |
7d535a |
00154 int p ;
|
|
kusano |
7d535a |
00155 } shared1 ;
|
|
kusano |
7d535a |
00156 union
|
|
kusano |
7d535a |
00157 {
|
|
kusano |
7d535a |
00158 int mark ;
|
|
kusano |
7d535a |
00159 int first_column ;
|
|
kusano |
7d535a |
00160 } shared2 ;
|
|
kusano |
7d535a |
00161
|
|
kusano |
7d535a |
00162 } Colamd_Row ;
|
|
kusano |
7d535a |
00163
|
|
kusano |
7d535a |
00164
|
|
kusano |
7d535a |
00165
|
|
kusano |
7d535a |
00166
|
|
kusano |
7d535a |
00167
|
|
kusano |
7d535a |
00168
|
|
kusano |
7d535a |
00169
|
|
kusano |
7d535a |
00170
|
|
kusano |
7d535a |
00171
|
|
kusano |
7d535a |
00172
|
|
kusano |
7d535a |
00173
|
|
kusano |
7d535a |
00174
|
|
kusano |
7d535a |
00175
|
|
kusano |
7d535a |
00176
|
|
kusano |
7d535a |
00177
|
|
kusano |
7d535a |
00178
|
|
kusano |
7d535a |
00179
|
|
kusano |
7d535a |
00180
|
|
kusano |
7d535a |
00181
|
|
kusano |
7d535a |
00182
|
|
kusano |
7d535a |
00183 #define COLAMD_C(n_col) ((int) (((n_col) + 1) * sizeof (Colamd_Col) / sizeof (int)))
|
|
kusano |
7d535a |
00184 #define COLAMD_R(n_row) ((int) (((n_row) + 1) * sizeof (Colamd_Row) / sizeof (int)))
|
|
kusano |
7d535a |
00185
|
|
kusano |
7d535a |
00186 #define COLAMD_RECOMMENDED(nnz, n_row, n_col) \
|
|
kusano |
7d535a |
00187 ( \
|
|
kusano |
7d535a |
00188 ((nnz) < 0 || (n_row) < 0 || (n_col) < 0) \
|
|
kusano |
7d535a |
00189 ? \
|
|
kusano |
7d535a |
00190 (-1) \
|
|
kusano |
7d535a |
00191 : \
|
|
kusano |
7d535a |
00192 (2 * (nnz) + COLAMD_C (n_col) + COLAMD_R (n_row) + (n_col) + ((nnz) / 5)) \
|
|
kusano |
7d535a |
00193 )
|
|
kusano |
7d535a |
00194
|
|
kusano |
7d535a |
00195
|
|
kusano |
7d535a |
00196
|
|
kusano |
7d535a |
00197
|
|
kusano |
7d535a |
00198
|
|
kusano |
7d535a |
00199 int colamd_recommended
|
|
kusano |
7d535a |
00200
|
|
kusano |
7d535a |
00201 (
|
|
kusano |
7d535a |
00202 int nnz,
|
|
kusano |
7d535a |
00203 int n_row,
|
|
kusano |
7d535a |
00204 int n_col
|
|
kusano |
7d535a |
00205 ) ;
|
|
kusano |
7d535a |
00206
|
|
kusano |
7d535a |
00207 void colamd_set_defaults
|
|
kusano |
7d535a |
00208 (
|
|
kusano |
7d535a |
00209 double knobs [COLAMD_KNOBS]
|
|
kusano |
7d535a |
00210 ) ;
|
|
kusano |
7d535a |
00211
|
|
kusano |
7d535a |
00212 int colamd
|
|
kusano |
7d535a |
00213 (
|
|
kusano |
7d535a |
00214 int n_row,
|
|
kusano |
7d535a |
00215 int n_col,
|
|
kusano |
7d535a |
00216 int Alen,
|
|
kusano |
7d535a |
00217 int A [],
|
|
kusano |
7d535a |
00218 int p [],
|
|
kusano |
7d535a |
00219 double knobs [COLAMD_KNOBS],
|
|
kusano |
7d535a |
00220 int stats [COLAMD_STATS]
|
|
kusano |
7d535a |
00221 ) ;
|
|
kusano |
7d535a |
00222
|
|
kusano |
7d535a |
00223 int symamd
|
|
kusano |
7d535a |
00224 (
|
|
kusano |
7d535a |
00225 int n,
|
|
kusano |
7d535a |
00226 int A [],
|
|
kusano |
7d535a |
00227 int p [],
|
|
kusano |
7d535a |
00228 int perm [],
|
|
kusano |
7d535a |
00229 double knobs [COLAMD_KNOBS],
|
|
kusano |
7d535a |
00230 int stats [COLAMD_STATS],
|
|
kusano |
7d535a |
00231 void * (*allocate) (size_t, size_t),
|
|
kusano |
7d535a |
00232
|
|
kusano |
7d535a |
00233
|
|
kusano |
7d535a |
00234 void (*release) (void *)
|
|
kusano |
7d535a |
00235
|
|
kusano |
7d535a |
00236
|
|
kusano |
7d535a |
00237 ) ;
|
|
kusano |
7d535a |
00238
|
|
kusano |
7d535a |
00239 void colamd_report
|
|
kusano |
7d535a |
00240 (
|
|
kusano |
7d535a |
00241 int stats [COLAMD_STATS]
|
|
kusano |
7d535a |
00242 ) ;
|
|
kusano |
7d535a |
00243
|
|
kusano |
7d535a |
00244 void symamd_report
|
|
kusano |
7d535a |
00245 (
|
|
kusano |
7d535a |
00246 int stats [COLAMD_STATS]
|
|
kusano |
7d535a |
00247 ) ;
|
|
kusano |
7d535a |
00248
|
|
kusano |
7d535a |
00249 #endif
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
<address style="text-align: right;"><small>Generated on Mon Nov 22 10:23:47 2010 for SuperLU by </small></address>
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
1.5.5
|
|
kusano |
7d535a |
|
|
kusano |
7d535a |
|