|
Blender
V2.59
|
Go to the source code of this file.
Classes | |
| struct | ColInfo_struct |
| struct | RowInfo_struct |
Defines | |
| #define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | ONES_COMPLEMENT(r) (-(r)-1) |
| #define | TRUE (1) |
| #define | FALSE (0) |
| #define | EMPTY (-1) |
| #define | ALIVE (0) |
| #define | DEAD (-1) |
| #define | DEAD_PRINCIPAL (-1) |
| #define | DEAD_NON_PRINCIPAL (-2) |
| #define | ROW_IS_DEAD(r) ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
| #define | ROW_IS_MARKED_DEAD(row_mark) (row_mark < ALIVE) |
| #define | ROW_IS_ALIVE(r) (Row [r].shared2.mark >= ALIVE) |
| #define | COL_IS_DEAD(c) (Col [c].start < ALIVE) |
| #define | COL_IS_ALIVE(c) (Col [c].start >= ALIVE) |
| #define | COL_IS_DEAD_PRINCIPAL(c) (Col [c].start == DEAD_PRINCIPAL) |
| #define | KILL_ROW(r) { Row [r].shared2.mark = DEAD ; } |
| #define | KILL_PRINCIPAL_COL(c) { Col [c].start = DEAD_PRINCIPAL ; } |
| #define | KILL_NON_PRINCIPAL_COL(c) { Col [c].start = DEAD_NON_PRINCIPAL ; } |
| #define | PUBLIC |
| #define | PRIVATE static |
| #define | DEBUG0(params) ; |
| #define | DEBUG1(params) ; |
| #define | DEBUG2(params) ; |
| #define | DEBUG3(params) ; |
| #define | DEBUG4(params) ; |
Typedefs | |
| typedef struct ColInfo_struct | ColInfo |
| typedef struct RowInfo_struct | RowInfo |
Functions | |
| PRIVATE int | init_rows_cols (int n_row, int n_col, RowInfo Row[], ColInfo Col[], int A[], int p[]) |
| PRIVATE void | init_scoring (int n_row, int n_col, RowInfo Row[], ColInfo Col[], int A[], int head[], double knobs[COLAMD_KNOBS], int *p_n_row2, int *p_n_col2, int *p_max_deg) |
| PRIVATE int | find_ordering (int n_row, int n_col, int Alen, RowInfo Row[], ColInfo Col[], int A[], int head[], int n_col2, int max_deg, int pfree) |
| PRIVATE void | order_children (int n_col, ColInfo Col[], int p[]) |
| PRIVATE void | detect_super_cols (ColInfo Col[], int A[], int head[], int row_start, int row_length) |
| PRIVATE int | garbage_collection (int n_row, int n_col, RowInfo Row[], ColInfo Col[], int A[], int *pfree) |
| PRIVATE int | clear_mark (int n_row, RowInfo Row[]) |
| PUBLIC int | colamd_recommended (int nnz, int n_row, int n_col) |
| PUBLIC void | colamd_set_defaults (double knobs[COLAMD_KNOBS]) |
| PUBLIC int | colamd (int n_row, int n_col, int Alen, int A[], int p[], double knobs[COLAMD_KNOBS]) |
Definition in file colamd.c.
| #define COL_IS_ALIVE | ( | c | ) | (Col [c].start >= ALIVE) |
Definition at line 368 of file colamd.c.
Referenced by detect_super_cols(), find_ordering(), garbage_collection(), and init_scoring().
| #define COL_IS_DEAD | ( | c | ) | (Col [c].start < ALIVE) |
Definition at line 367 of file colamd.c.
Referenced by detect_super_cols(), find_ordering(), init_scoring(), and order_children().
| #define COL_IS_DEAD_PRINCIPAL | ( | c | ) | (Col [c].start == DEAD_PRINCIPAL) |
Definition at line 369 of file colamd.c.
Referenced by order_children().
| #define DEBUG0 | ( | params | ) | ; |
Definition at line 524 of file colamd.c.
Referenced by clear_mark(), colamd(), colamd_recommended(), find_ordering(), garbage_collection(), init_rows_cols(), and init_scoring().
| #define DEBUG1 | ( | params | ) | ; |
Definition at line 525 of file colamd.c.
Referenced by find_ordering().
| #define DEBUG2 | ( | params | ) | ; |
Definition at line 526 of file colamd.c.
Referenced by find_ordering().
| #define DEBUG3 | ( | params | ) | ; |
Definition at line 527 of file colamd.c.
Referenced by find_ordering().
| #define DEBUG4 | ( | params | ) | ; |
Definition at line 528 of file colamd.c.
Referenced by find_ordering(), and init_scoring().
| #define EMPTY (-1) |
Definition at line 353 of file colamd.c.
Referenced by detect_super_cols(), find_ordering(), init_rows_cols(), init_scoring(), and order_children().
| #define FALSE (0) |
Definition at line 352 of file colamd.c.
Referenced by colamd(), and init_rows_cols().
| #define KILL_NON_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_NON_PRINCIPAL ; } |
Definition at line 372 of file colamd.c.
Referenced by detect_super_cols().
| #define KILL_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_PRINCIPAL ; } |
Definition at line 371 of file colamd.c.
Referenced by find_ordering(), and init_scoring().
| #define KILL_ROW | ( | r | ) | { Row [r].shared2.mark = DEAD ; } |
Definition at line 370 of file colamd.c.
Referenced by find_ordering(), garbage_collection(), and init_scoring().
| #define ONES_COMPLEMENT | ( | r | ) | (-(r)-1) |
Definition at line 349 of file colamd.c.
Referenced by garbage_collection().
| #define ROW_IS_ALIVE | ( | r | ) | (Row [r].shared2.mark >= ALIVE) |
Definition at line 366 of file colamd.c.
Referenced by clear_mark(), detect_super_cols(), find_ordering(), and garbage_collection().
| #define ROW_IS_DEAD | ( | r | ) | ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
Definition at line 364 of file colamd.c.
Referenced by find_ordering(), and init_scoring().
| #define ROW_IS_MARKED_DEAD | ( | row_mark | ) | (row_mark < ALIVE) |
Definition at line 365 of file colamd.c.
Referenced by find_ordering().
| #define TRUE (1) |
Definition at line 351 of file colamd.c.
Referenced by colamd(), and init_rows_cols().
| typedef struct ColInfo_struct ColInfo |
| typedef struct RowInfo_struct RowInfo |
| PRIVATE int clear_mark | ( | int | n_row, |
| RowInfo | Row[] | ||
| ) |
Definition at line 2280 of file colamd.c.
References DEBUG0, and ROW_IS_ALIVE.
Referenced by find_ordering().
| PUBLIC int colamd | ( | int | n_row, |
| int | n_col, | ||
| int | Alen, | ||
| int | A[], | ||
| int | p[], | ||
| double | knobs[COLAMD_KNOBS] | ||
| ) |
Definition at line 712 of file colamd.c.
References A, COLAMD_DEFRAG_COUNT, COLAMD_DENSE_COL, COLAMD_DENSE_ROW, COLAMD_JUMBLED_COLS, COLAMD_KNOBS, colamd_set_defaults(), COLAMD_STATS, DEBUG0, FALSE, find_ordering(), i, init_rows_cols(), init_scoring(), order_children(), and TRUE.
Referenced by get_colamd().
| PUBLIC int colamd_recommended | ( | int | nnz, |
| int | n_row, | ||
| int | n_col | ||
| ) |
Definition at line 551 of file colamd.c.
References COLAMD_STATS, and DEBUG0.
Referenced by get_colamd().
| PUBLIC void colamd_set_defaults | ( | double | knobs[COLAMD_KNOBS] | ) |
Definition at line 606 of file colamd.c.
References COLAMD_DENSE_COL, COLAMD_DENSE_ROW, COLAMD_KNOBS, and i.
Referenced by colamd(), and get_colamd().
| PRIVATE void detect_super_cols | ( | ColInfo | Col[], |
| int | A[], | ||
| int | head[], | ||
| int | row_start, | ||
| int | row_length | ||
| ) |
Definition at line 1992 of file colamd.c.
References assert, COL_IS_ALIVE, COL_IS_DEAD, EMPTY, hash, i, KILL_NON_PRINCIPAL_COL, length(), and ROW_IS_ALIVE.
Referenced by find_ordering().
| PRIVATE int find_ordering | ( | int | n_row, |
| int | n_col, | ||
| int | Alen, | ||
| RowInfo | Row[], | ||
| ColInfo | Col[], | ||
| int | A[], | ||
| int | head[], | ||
| int | n_col2, | ||
| int | max_deg, | ||
| int | pfree | ||
| ) |
Definition at line 1332 of file colamd.c.
References assert, clear_mark(), COL_IS_ALIVE, COL_IS_DEAD, DEBUG0, DEBUG1, DEBUG2, DEBUG3, DEBUG4, detect_super_cols(), EMPTY, garbage_collection(), hash, KILL_PRINCIPAL_COL, KILL_ROW, length(), MAX, MIN, ROW_IS_ALIVE, ROW_IS_DEAD, and ROW_IS_MARKED_DEAD.
Referenced by colamd().
| PRIVATE int garbage_collection | ( | int | n_row, |
| int | n_col, | ||
| RowInfo | Row[], | ||
| ColInfo | Col[], | ||
| int | A[], | ||
| int * | pfree | ||
| ) |
Definition at line 2148 of file colamd.c.
References assert, COL_IS_ALIVE, DEBUG0, KILL_ROW, length(), ONES_COMPLEMENT, and ROW_IS_ALIVE.
Referenced by find_ordering().
| PRIVATE void init_scoring | ( | int | n_row, |
| int | n_col, | ||
| RowInfo | Row[], | ||
| ColInfo | Col[], | ||
| int | A[], | ||
| int | head[], | ||
| double | knobs[COLAMD_KNOBS], | ||
| int * | p_n_row2, | ||
| int * | p_n_col2, | ||
| int * | p_max_deg | ||
| ) |
Definition at line 1079 of file colamd.c.
References assert, COL_IS_ALIVE, COL_IS_DEAD, COLAMD_DENSE_COL, COLAMD_DENSE_ROW, DEBUG0, DEBUG4, RowInfo_struct::degree, ColInfo_struct::degree_next, EMPTY, KILL_PRINCIPAL_COL, KILL_ROW, ColInfo_struct::length, MAX, MIN, ColInfo_struct::order, ColInfo_struct::prev, ROW_IS_DEAD, ColInfo_struct::score, RowInfo_struct::shared1, ColInfo_struct::shared2, ColInfo_struct::shared3, ColInfo_struct::shared4, and ColInfo_struct::start.
Referenced by colamd().
| PRIVATE void order_children | ( | int | n_col, |
| ColInfo | Col[], | ||
| int | p[] | ||
| ) |
Definition at line 1891 of file colamd.c.
References assert, COL_IS_DEAD, COL_IS_DEAD_PRINCIPAL, EMPTY, i, ColInfo_struct::order, ColInfo_struct::parent, ColInfo_struct::shared1, and ColInfo_struct::shared2.
Referenced by colamd().