|
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 | DLONG 1 |
| #define | NULL ((void *) 0) |
| #define | Int UF_long |
| #define | ID UF_long_id |
| #define | Int_MAX UF_long_max |
| #define | COLAMD_recommended amesos_colamd_l_recommended |
| #define | COLAMD_set_defaults amesos_colamd_l_set_defaults |
| #define | COLAMD_MAIN amesos_colamd_l |
| #define | SYMAMD_MAIN amesos_symamd_l |
| #define | COLAMD_report amesos_colamd_l_report |
| #define | SYMAMD_report amesos_symamd_l_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_l.c.
| #define DLONG 1 |
Definition at line 667 of file amesos_colamd_l.c.
| #define NULL ((void *) 0) |
Definition at line 683 of file amesos_colamd_l.c.
| #define Int UF_long |
Definition at line 695 of file amesos_colamd_l.c.
| #define ID UF_long_id |
Definition at line 696 of file amesos_colamd_l.c.
| #define Int_MAX UF_long_max |
Definition at line 697 of file amesos_colamd_l.c.
| #define COLAMD_recommended amesos_colamd_l_recommended |
Definition at line 699 of file amesos_colamd_l.c.
| #define COLAMD_set_defaults amesos_colamd_l_set_defaults |
Definition at line 700 of file amesos_colamd_l.c.
| #define COLAMD_MAIN amesos_colamd_l |
Definition at line 701 of file amesos_colamd_l.c.
| #define SYMAMD_MAIN amesos_symamd_l |
Definition at line 702 of file amesos_colamd_l.c.
| #define COLAMD_report amesos_colamd_l_report |
Definition at line 703 of file amesos_colamd_l.c.
| #define SYMAMD_report amesos_symamd_l_report |
Definition at line 704 of file amesos_colamd_l.c.
| #define PUBLIC |
Definition at line 783 of file amesos_colamd_l.c.
| #define PRIVATE static |
Definition at line 784 of file amesos_colamd_l.c.
Definition at line 786 of file amesos_colamd_l.c.
| #define MAX | ( | a, | |
| b | |||
| ) | (((a) > (b)) ? (a) : (b)) |
Definition at line 789 of file amesos_colamd_l.c.
| #define MIN | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
Definition at line 790 of file amesos_colamd_l.c.
| #define ONES_COMPLEMENT | ( | r | ) | (-(r)-1) |
Definition at line 792 of file amesos_colamd_l.c.
| #define TRUE (1) |
Definition at line 799 of file amesos_colamd_l.c.
| #define FALSE (0) |
Definition at line 803 of file amesos_colamd_l.c.
| #define EMPTY (-1) |
Definition at line 808 of file amesos_colamd_l.c.
| #define ALIVE (0) |
Definition at line 811 of file amesos_colamd_l.c.
| #define DEAD (-1) |
Definition at line 812 of file amesos_colamd_l.c.
| #define DEAD_PRINCIPAL (-1) |
Definition at line 815 of file amesos_colamd_l.c.
| #define DEAD_NON_PRINCIPAL (-2) |
Definition at line 816 of file amesos_colamd_l.c.
| #define ROW_IS_DEAD | ( | r | ) | ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
Definition at line 819 of file amesos_colamd_l.c.
| #define ROW_IS_MARKED_DEAD | ( | row_mark | ) | (row_mark < ALIVE) |
Definition at line 820 of file amesos_colamd_l.c.
| #define ROW_IS_ALIVE | ( | r | ) | (Row [r].shared2.mark >= ALIVE) |
Definition at line 821 of file amesos_colamd_l.c.
Definition at line 822 of file amesos_colamd_l.c.
Definition at line 823 of file amesos_colamd_l.c.
| #define COL_IS_DEAD_PRINCIPAL | ( | c | ) | (Col [c].start == DEAD_PRINCIPAL) |
Definition at line 824 of file amesos_colamd_l.c.
| #define KILL_ROW | ( | r | ) | { Row [r].shared2.mark = DEAD ; } |
Definition at line 825 of file amesos_colamd_l.c.
| #define KILL_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_PRINCIPAL ; } |
Definition at line 826 of file amesos_colamd_l.c.
| #define KILL_NON_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_NON_PRINCIPAL ; } |
Definition at line 827 of file amesos_colamd_l.c.
| #define INDEX | ( | i | ) | (i) |
Definition at line 838 of file amesos_colamd_l.c.
| #define PRINTF | ( | params | ) | { if (amesos_colamd_printf != NULL) (void) amesos_colamd_printf params ; } |
Definition at line 842 of file amesos_colamd_l.c.
| #define DEBUG0 | ( | params | ) | ; |
Definition at line 1007 of file amesos_colamd_l.c.
| #define DEBUG1 | ( | params | ) | ; |
Definition at line 1008 of file amesos_colamd_l.c.
| #define DEBUG2 | ( | params | ) | ; |
Definition at line 1009 of file amesos_colamd_l.c.
| #define DEBUG3 | ( | params | ) | ; |
Definition at line 1010 of file amesos_colamd_l.c.
| #define DEBUG4 | ( | params | ) | ; |
Definition at line 1011 of file amesos_colamd_l.c.
| #define ASSERT | ( | expression | ) |
Definition at line 1013 of file amesos_colamd_l.c.
| #define COLAMD_C | ( | n_col, | |
| ok | |||
| ) | ((t_mult (t_add (n_col, 1, ok), sizeof (Colamd_Col), ok) / sizeof (Int))) |
Definition at line 1061 of file amesos_colamd_l.c.
| #define COLAMD_R | ( | n_row, | |
| ok | |||
| ) | ((t_mult (t_add (n_row, 1, ok), sizeof (Colamd_Row), ok) / sizeof (Int))) |
Definition at line 1064 of file amesos_colamd_l.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 1684 of file amesos_colamd_l.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 1921 of file amesos_colamd_l.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 2196 of file amesos_colamd_l.c.
| PRIVATE void order_children | ( | Int | n_col, |
| Colamd_Col | Col[], | ||
| Int | p[] | ||
| ) |
Definition at line 2761 of file amesos_colamd_l.c.
| PRIVATE void detect_super_cols | ( | Colamd_Col | Col[], |
| Int | A[], | ||
| Int | head[], | ||
| Int | row_start, | ||
| Int | row_length | ||
| ) |
Definition at line 2862 of file amesos_colamd_l.c.
| PRIVATE Int garbage_collection | ( | Int | n_row, |
| Int | n_col, | ||
| Colamd_Row | Row[], | ||
| Colamd_Col | Col[], | ||
| Int | A[], | ||
| Int * | pfree | ||
| ) |
Definition at line 3019 of file amesos_colamd_l.c.
Definition at line 3151 of file amesos_colamd_l.c.
Definition at line 3186 of file amesos_colamd_l.c.
|
static |
Definition at line 1043 of file amesos_colamd_l.c.
|
static |
Definition at line 1050 of file amesos_colamd_l.c.
Definition at line 1069 of file amesos_colamd_l.c.
| PUBLIC void COLAMD_set_defaults | ( | double | knobs[COLAMD_KNOBS] | ) |
Definition at line 1123 of file amesos_colamd_l.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 1152 of file amesos_colamd_l.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 1472 of file amesos_colamd_l.c.
Definition at line 1641 of file amesos_colamd_l.c.
Definition at line 1654 of file amesos_colamd_l.c.
1.8.6