|
Amesos Package Browser (Single Doxygen Collection)
Development
|
#include "amesos_colamd.h"#include <limits.h>#include <math.h>#include <stdio.h>#include "amesos_UFconfig.h"
Go to the source code of this file.
Classes | |
| struct | Colamd_Col_struct |
| struct | Colamd_Row_struct |
Macros | |
| #define | NDEBUG |
| #define | NULL ((void *) 0) |
| #define | Int int |
| #define | ID "%d" |
| #define | Int_MAX INT_MAX |
| #define | COLAMD_recommended amesos_colamd_recommended |
| #define | COLAMD_set_defaults amesos_colamd_set_defaults |
| #define | COLAMD_MAIN amesos_colamd |
| #define | SYMAMD_MAIN amesos_symamd |
| #define | COLAMD_report amesos_colamd_report |
| #define | SYMAMD_report amesos_symamd_report |
| #define | PUBLIC |
| #define | PRIVATE static |
| #define | DENSE_DEGREE(alpha, n) ((Int) MAX (16.0, (alpha) * sqrt ((double) (n)))) |
| #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 | INDEX(i) (i) |
| #define | PRINTF(params) { if (amesos_colamd_printf != NULL) (void) amesos_colamd_printf params ; } |
| #define | DEBUG0(params) ; |
| #define | DEBUG1(params) ; |
| #define | DEBUG2(params) ; |
| #define | DEBUG3(params) ; |
| #define | DEBUG4(params) ; |
| #define | ASSERT(expression) |
| #define | COLAMD_C(n_col, ok) ((t_mult (t_add (n_col, 1, ok), sizeof (Colamd_Col), ok) / sizeof (Int))) |
| #define | COLAMD_R(n_row, ok) ((t_mult (t_add (n_row, 1, ok), sizeof (Colamd_Row), ok) / sizeof (Int))) |
Typedefs | |
| typedef struct Colamd_Col_struct | Colamd_Col |
| typedef struct Colamd_Row_struct | Colamd_Row |
Functions | |
| PRIVATE Int | init_rows_cols (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int p[], Int stats[COLAMD_STATS]) |
| PRIVATE void | init_scoring (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col 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, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int head[], Int n_col2, Int max_deg, Int pfree, Int aggressive) |
| PRIVATE void | order_children (Int n_col, Colamd_Col Col[], Int p[]) |
| PRIVATE void | detect_super_cols (Colamd_Col Col[], Int A[], Int head[], Int row_start, Int row_length) |
| PRIVATE Int | garbage_collection (Int n_row, Int n_col, Colamd_Row Row[], Colamd_Col Col[], Int A[], Int *pfree) |
| PRIVATE Int | clear_mark (Int tag_mark, Int max_mark, Int n_row, Colamd_Row Row[]) |
| PRIVATE void | print_report (char *method, Int stats[COLAMD_STATS]) |
| static size_t | t_add (size_t a, size_t b, int *ok) |
| static size_t | t_mult (size_t a, size_t k, int *ok) |
| PUBLIC size_t | COLAMD_recommended (Int nnz, Int n_row, Int n_col) |
| PUBLIC void | COLAMD_set_defaults (double knobs[COLAMD_KNOBS]) |
| PUBLIC Int | SYMAMD_MAIN (Int n, Int A[], Int p[], Int perm[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS], void *(*allocate)(size_t, size_t), void(*release)(void *)) |
| PUBLIC Int | COLAMD_MAIN (Int n_row, Int n_col, Int Alen, Int A[], Int p[], double knobs[COLAMD_KNOBS], Int stats[COLAMD_STATS]) |
| PUBLIC void | COLAMD_report (Int stats[COLAMD_STATS]) |
| PUBLIC void | SYMAMD_report (Int stats[COLAMD_STATS]) |
| #define NDEBUG |
Definition at line 626 of file amesos_colamd.c.
| #define NULL ((void *) 0) |
Definition at line 680 of file amesos_colamd.c.
| #define Int int |
Definition at line 705 of file amesos_colamd.c.
| #define ID "%d" |
Definition at line 706 of file amesos_colamd.c.
| #define Int_MAX INT_MAX |
Definition at line 707 of file amesos_colamd.c.
| #define COLAMD_recommended amesos_colamd_recommended |
Definition at line 709 of file amesos_colamd.c.
| #define COLAMD_set_defaults amesos_colamd_set_defaults |
Definition at line 710 of file amesos_colamd.c.
| #define COLAMD_MAIN amesos_colamd |
Definition at line 711 of file amesos_colamd.c.
| #define SYMAMD_MAIN amesos_symamd |
Definition at line 712 of file amesos_colamd.c.
| #define COLAMD_report amesos_colamd_report |
Definition at line 713 of file amesos_colamd.c.
| #define SYMAMD_report amesos_symamd_report |
Definition at line 714 of file amesos_colamd.c.
| #define PUBLIC |
Definition at line 780 of file amesos_colamd.c.
| #define PRIVATE static |
Definition at line 781 of file amesos_colamd.c.
Definition at line 783 of file amesos_colamd.c.
| #define MAX | ( | a, | |
| b | |||
| ) | (((a) > (b)) ? (a) : (b)) |
Definition at line 786 of file amesos_colamd.c.
| #define MIN | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
Definition at line 787 of file amesos_colamd.c.
| #define ONES_COMPLEMENT | ( | r | ) | (-(r)-1) |
Definition at line 789 of file amesos_colamd.c.
| #define TRUE (1) |
Definition at line 796 of file amesos_colamd.c.
| #define FALSE (0) |
Definition at line 800 of file amesos_colamd.c.
| #define EMPTY (-1) |
Definition at line 805 of file amesos_colamd.c.
| #define ALIVE (0) |
Definition at line 808 of file amesos_colamd.c.
| #define DEAD (-1) |
Definition at line 809 of file amesos_colamd.c.
| #define DEAD_PRINCIPAL (-1) |
Definition at line 812 of file amesos_colamd.c.
| #define DEAD_NON_PRINCIPAL (-2) |
Definition at line 813 of file amesos_colamd.c.
| #define ROW_IS_DEAD | ( | r | ) | ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
Definition at line 816 of file amesos_colamd.c.
| #define ROW_IS_MARKED_DEAD | ( | row_mark | ) | (row_mark < ALIVE) |
Definition at line 817 of file amesos_colamd.c.
| #define ROW_IS_ALIVE | ( | r | ) | (Row [r].shared2.mark >= ALIVE) |
Definition at line 818 of file amesos_colamd.c.
Definition at line 819 of file amesos_colamd.c.
Definition at line 820 of file amesos_colamd.c.
| #define COL_IS_DEAD_PRINCIPAL | ( | c | ) | (Col [c].start == DEAD_PRINCIPAL) |
Definition at line 821 of file amesos_colamd.c.
| #define KILL_ROW | ( | r | ) | { Row [r].shared2.mark = DEAD ; } |
Definition at line 822 of file amesos_colamd.c.
| #define KILL_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_PRINCIPAL ; } |
Definition at line 823 of file amesos_colamd.c.
| #define KILL_NON_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_NON_PRINCIPAL ; } |
Definition at line 824 of file amesos_colamd.c.
| #define INDEX | ( | i | ) | (i) |
Definition at line 835 of file amesos_colamd.c.
| #define PRINTF | ( | params | ) | { if (amesos_colamd_printf != NULL) (void) amesos_colamd_printf params ; } |
Definition at line 839 of file amesos_colamd.c.
| #define DEBUG0 | ( | params | ) | ; |
Definition at line 1004 of file amesos_colamd.c.
| #define DEBUG1 | ( | params | ) | ; |
Definition at line 1005 of file amesos_colamd.c.
| #define DEBUG2 | ( | params | ) | ; |
Definition at line 1006 of file amesos_colamd.c.
| #define DEBUG3 | ( | params | ) | ; |
Definition at line 1007 of file amesos_colamd.c.
| #define DEBUG4 | ( | params | ) | ; |
Definition at line 1008 of file amesos_colamd.c.
| #define ASSERT | ( | expression | ) |
Definition at line 1010 of file amesos_colamd.c.
| #define COLAMD_C | ( | n_col, | |
| ok | |||
| ) | ((t_mult (t_add (n_col, 1, ok), sizeof (Colamd_Col), ok) / sizeof (Int))) |
Definition at line 1058 of file amesos_colamd.c.
| #define COLAMD_R | ( | n_row, | |
| ok | |||
| ) | ((t_mult (t_add (n_row, 1, ok), sizeof (Colamd_Row), ok) / sizeof (Int))) |
Definition at line 1061 of file amesos_colamd.c.
| typedef struct Colamd_Col_struct Colamd_Col |
| typedef struct Colamd_Row_struct Colamd_Row |
| PRIVATE Int init_rows_cols | ( | Int | n_row, |
| Int | n_col, | ||
| Colamd_Row | Row[], | ||
| Colamd_Col | Col[], | ||
| Int | A[], | ||
| Int | p[], | ||
| Int | stats[COLAMD_STATS] | ||
| ) |
Definition at line 1681 of file amesos_colamd.c.
| PRIVATE void init_scoring | ( | Int | n_row, |
| Int | n_col, | ||
| Colamd_Row | Row[], | ||
| Colamd_Col | Col[], | ||
| Int | A[], | ||
| Int | head[], | ||
| double | knobs[COLAMD_KNOBS], | ||
| Int * | p_n_row2, | ||
| Int * | p_n_col2, | ||
| Int * | p_max_deg | ||
| ) |
Definition at line 1918 of file amesos_colamd.c.
| PRIVATE Int find_ordering | ( | Int | n_row, |
| Int | n_col, | ||
| Int | Alen, | ||
| Colamd_Row | Row[], | ||
| Colamd_Col | Col[], | ||
| Int | A[], | ||
| Int | head[], | ||
| Int | n_col2, | ||
| Int | max_deg, | ||
| Int | pfree, | ||
| Int | aggressive | ||
| ) |
Definition at line 2193 of file amesos_colamd.c.
| PRIVATE void order_children | ( | Int | n_col, |
| Colamd_Col | Col[], | ||
| Int | p[] | ||
| ) |
Definition at line 2758 of file amesos_colamd.c.
| PRIVATE void detect_super_cols | ( | Colamd_Col | Col[], |
| Int | A[], | ||
| Int | head[], | ||
| Int | row_start, | ||
| Int | row_length | ||
| ) |
Definition at line 2859 of file amesos_colamd.c.
| PRIVATE Int garbage_collection | ( | Int | n_row, |
| Int | n_col, | ||
| Colamd_Row | Row[], | ||
| Colamd_Col | Col[], | ||
| Int | A[], | ||
| Int * | pfree | ||
| ) |
Definition at line 3016 of file amesos_colamd.c.
Definition at line 3148 of file amesos_colamd.c.
Definition at line 3183 of file amesos_colamd.c.
|
static |
Definition at line 1040 of file amesos_colamd.c.
|
static |
Definition at line 1047 of file amesos_colamd.c.
Definition at line 1066 of file amesos_colamd.c.
| PUBLIC void COLAMD_set_defaults | ( | double | knobs[COLAMD_KNOBS] | ) |
Definition at line 1120 of file amesos_colamd.c.
| PUBLIC Int SYMAMD_MAIN | ( | Int | n, |
| Int | A[], | ||
| Int | p[], | ||
| Int | perm[], | ||
| double | knobs[COLAMD_KNOBS], | ||
| Int | stats[COLAMD_STATS], | ||
| void *(*)(size_t, size_t) | allocate, | ||
| void(*)(void *) | release | ||
| ) |
Definition at line 1149 of file amesos_colamd.c.
| PUBLIC Int COLAMD_MAIN | ( | Int | n_row, |
| Int | n_col, | ||
| Int | Alen, | ||
| Int | A[], | ||
| Int | p[], | ||
| double | knobs[COLAMD_KNOBS], | ||
| Int | stats[COLAMD_STATS] | ||
| ) |
Definition at line 1469 of file amesos_colamd.c.
Definition at line 1638 of file amesos_colamd.c.
Definition at line 1651 of file amesos_colamd.c.
1.8.6