|
Amesos Package Browser (Single Doxygen Collection)
Development
|
#include "amesos_ccolamd.h"#include <stdlib.h>#include <math.h>#include <limits.h>#include <stdio.h>#include "amesos_UFconfig.h"
Go to the source code of this file.
Classes | |
| struct | CColamd_Col_struct |
| struct | CColamd_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 | CCOLAMD_recommended amesos_ccolamd_l_recommended |
| #define | CCOLAMD_set_defaults amesos_ccolamd_l_set_defaults |
| #define | CCOLAMD_2 amesos_ccolamd2_l |
| #define | CCOLAMD_MAIN amesos_ccolamd_l |
| #define | CCOLAMD_apply_order amesos_ccolamd_l_apply_order |
| #define | CCOLAMD_postorder amesos_ccolamd_l_postorder |
| #define | CCOLAMD_post_tree amesos_ccolamd_l_post_tree |
| #define | CCOLAMD_fsize amesos_ccolamd_l_fsize |
| #define | CSYMAMD_MAIN amesos_csymamd_l |
| #define | CCOLAMD_report amesos_ccolamd_l_report |
| #define | CSYMAMD_report amesos_csymamd_l_report |
| #define | EMPTY (-1) |
| #define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
| #define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
| #define | GLOBAL |
| #define | PUBLIC |
| #define | PRIVATE static |
| #define | DENSE_DEGREE(alpha, n) ((Int) MAX (16.0, (alpha) * sqrt ((double) (n)))) |
| #define | CMEMBER(c) ((cmember == (Int *) NULL) ? (0) : (cmember [c])) |
| #define | SCALAR_IS_NAN(x) ((x) != (x)) |
| #define | INT_OVERFLOW(x) |
| #define | ONES_COMPLEMENT(r) (-(r)-1) |
| #define | TRUE (1) |
| #define | FALSE (0) |
| #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_ccolamd_printf != NULL) (void) amesos_ccolamd_printf params ; } |
| #define | DEBUG0(params) ; |
| #define | DEBUG1(params) ; |
| #define | DEBUG2(params) ; |
| #define | DEBUG3(params) ; |
| #define | DEBUG4(params) ; |
| #define | ASSERT(expression) |
| #define | CCOLAMD_C(n_col, ok) ((t_mult (t_add (n_col, 1, ok), sizeof (CColamd_Col), ok) / sizeof (Int))) |
| #define | CCOLAMD_R(n_row, ok) ((t_mult (t_add (n_row, 1, ok), sizeof (CColamd_Row), ok) / sizeof (Int))) |
Typedefs | |
| typedef struct CColamd_Col_struct | CColamd_Col |
| typedef struct CColamd_Row_struct | CColamd_Row |
Functions | |
| PRIVATE Int | init_rows_cols (Int n_row, Int n_col, CColamd_Row Row[], CColamd_Col Col[], Int A[], Int p[], Int stats[CCOLAMD_STATS]) |
| PRIVATE void | init_scoring (Int n_row, Int n_col, CColamd_Row Row[], CColamd_Col Col[], Int A[], Int head[], double knobs[CCOLAMD_KNOBS], Int *p_n_row2, Int *p_n_col2, Int *p_max_deg, Int cmember[], Int n_cset, Int cset_start[], Int dead_cols[], Int *p_ndense_row, Int *p_nempty_row, Int *p_nnewlyempty_row, Int *p_ndense_col, Int *p_nempty_col, Int *p_nnewlyempty_col) |
| PRIVATE Int | find_ordering (Int n_row, Int n_col, Int Alen, CColamd_Row Row[], CColamd_Col Col[], Int A[], Int head[], Int max_deg, Int pfree, Int cset[], Int cset_start[], Int cmember[], Int Front_npivcol[], Int Front_nrows[], Int Front_ncols[], Int Front_parent[], Int Front_cols[], Int *p_nfr, Int aggressive, Int InFront[], Int order_for_lu) |
| PRIVATE void | detect_super_cols (CColamd_Col Col[], Int A[], Int head[], Int row_start, Int row_length, Int in_set[]) |
| PRIVATE Int | garbage_collection (Int n_row, Int n_col, CColamd_Row Row[], CColamd_Col Col[], Int A[], Int *pfree) |
| PRIVATE Int | clear_mark (Int tag_mark, Int max_mark, Int n_row, CColamd_Row Row[]) |
| PRIVATE void | print_report (char *method, Int stats[CCOLAMD_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) |
| static size_t | ccolamd_need (Int nnz, Int n_row, Int n_col, int *ok) |
| PUBLIC size_t | CCOLAMD_recommended (Int nnz, Int n_row, Int n_col) |
| PUBLIC void | CCOLAMD_set_defaults (double knobs[CCOLAMD_KNOBS]) |
| PUBLIC Int | CSYMAMD_MAIN (Int n, Int A[], Int p[], Int perm[], double knobs[CCOLAMD_KNOBS], Int stats[CCOLAMD_STATS], void *(*allocate)(size_t, size_t), void(*release)(void *), Int cmember[], Int stype) |
| PUBLIC Int | CCOLAMD_MAIN (Int n_row, Int n_col, Int Alen, Int A[], Int p[], double knobs[CCOLAMD_KNOBS], Int stats[CCOLAMD_STATS], Int cmember[]) |
| PUBLIC Int | CCOLAMD_2 (Int n_row, Int n_col, Int Alen, Int A[], Int p[], double knobs[CCOLAMD_KNOBS], Int stats[CCOLAMD_STATS], Int Front_npivcol[], Int Front_nrows[], Int Front_ncols[], Int Front_parent[], Int Front_cols[], Int *p_nfr, Int InFront[], Int cmember[]) |
| PUBLIC void | CCOLAMD_report (Int stats[CCOLAMD_STATS]) |
| PUBLIC void | CSYMAMD_report (Int stats[CCOLAMD_STATS]) |
| GLOBAL void | CCOLAMD_apply_order (Int Front[], const Int Order[], Int Temp[], Int nn, Int nfr) |
| GLOBAL void | CCOLAMD_fsize (Int nn, Int Fsize[], Int Fnrows[], Int Fncols[], Int Parent[], Int Npiv[]) |
| GLOBAL void | CCOLAMD_postorder (Int nn, Int Parent[], Int Nv[], Int Fsize[], Int Order[], Int Child[], Int Sibling[], Int Stack[], Int Front_cols[], Int cmember[]) |
| GLOBAL Int | CCOLAMD_post_tree (Int root, Int k, Int Child[], const Int Sibling[], Int Order[], Int Stack[]) |
| #define NDEBUG |
Definition at line 607 of file amesos_ccolamd_l.c.
| #define DLONG 1 |
Definition at line 611 of file amesos_ccolamd_l.c.
| #define NULL ((void *) 0) |
Definition at line 637 of file amesos_ccolamd_l.c.
| #define Int UF_long |
Definition at line 649 of file amesos_ccolamd_l.c.
| #define ID UF_long_id |
Definition at line 650 of file amesos_ccolamd_l.c.
| #define Int_MAX UF_long_max |
Definition at line 651 of file amesos_ccolamd_l.c.
| #define CCOLAMD_recommended amesos_ccolamd_l_recommended |
Definition at line 653 of file amesos_ccolamd_l.c.
| #define CCOLAMD_set_defaults amesos_ccolamd_l_set_defaults |
Definition at line 654 of file amesos_ccolamd_l.c.
| #define CCOLAMD_2 amesos_ccolamd2_l |
Definition at line 655 of file amesos_ccolamd_l.c.
| #define CCOLAMD_MAIN amesos_ccolamd_l |
Definition at line 656 of file amesos_ccolamd_l.c.
| #define CCOLAMD_apply_order amesos_ccolamd_l_apply_order |
Definition at line 657 of file amesos_ccolamd_l.c.
| #define CCOLAMD_postorder amesos_ccolamd_l_postorder |
Definition at line 658 of file amesos_ccolamd_l.c.
| #define CCOLAMD_post_tree amesos_ccolamd_l_post_tree |
Definition at line 659 of file amesos_ccolamd_l.c.
| #define CCOLAMD_fsize amesos_ccolamd_l_fsize |
Definition at line 660 of file amesos_ccolamd_l.c.
| #define CSYMAMD_MAIN amesos_csymamd_l |
Definition at line 661 of file amesos_ccolamd_l.c.
| #define CCOLAMD_report amesos_ccolamd_l_report |
Definition at line 662 of file amesos_ccolamd_l.c.
| #define CSYMAMD_report amesos_csymamd_l_report |
Definition at line 663 of file amesos_ccolamd_l.c.
| #define EMPTY (-1) |
Definition at line 757 of file amesos_ccolamd_l.c.
| #define MAX | ( | a, | |
| b | |||
| ) | (((a) > (b)) ? (a) : (b)) |
Definition at line 758 of file amesos_ccolamd_l.c.
| #define MIN | ( | a, | |
| b | |||
| ) | (((a) < (b)) ? (a) : (b)) |
Definition at line 759 of file amesos_ccolamd_l.c.
| #define GLOBAL |
Definition at line 762 of file amesos_ccolamd_l.c.
| #define PUBLIC |
Definition at line 763 of file amesos_ccolamd_l.c.
| #define PRIVATE static |
Definition at line 764 of file amesos_ccolamd_l.c.
Definition at line 766 of file amesos_ccolamd_l.c.
Definition at line 769 of file amesos_ccolamd_l.c.
| #define SCALAR_IS_NAN | ( | x | ) | ((x) != (x)) |
Definition at line 772 of file amesos_ccolamd_l.c.
| #define INT_OVERFLOW | ( | x | ) |
Definition at line 775 of file amesos_ccolamd_l.c.
| #define ONES_COMPLEMENT | ( | r | ) | (-(r)-1) |
Definition at line 778 of file amesos_ccolamd_l.c.
| #define TRUE (1) |
Definition at line 781 of file amesos_ccolamd_l.c.
| #define FALSE (0) |
Definition at line 782 of file amesos_ccolamd_l.c.
| #define ALIVE (0) |
Definition at line 785 of file amesos_ccolamd_l.c.
| #define DEAD (-1) |
Definition at line 786 of file amesos_ccolamd_l.c.
| #define DEAD_PRINCIPAL (-1) |
Definition at line 789 of file amesos_ccolamd_l.c.
| #define DEAD_NON_PRINCIPAL (-2) |
Definition at line 790 of file amesos_ccolamd_l.c.
| #define ROW_IS_DEAD | ( | r | ) | ROW_IS_MARKED_DEAD (Row[r].shared2.mark) |
Definition at line 793 of file amesos_ccolamd_l.c.
| #define ROW_IS_MARKED_DEAD | ( | row_mark | ) | (row_mark < ALIVE) |
Definition at line 794 of file amesos_ccolamd_l.c.
| #define ROW_IS_ALIVE | ( | r | ) | (Row [r].shared2.mark >= ALIVE) |
Definition at line 795 of file amesos_ccolamd_l.c.
Definition at line 796 of file amesos_ccolamd_l.c.
Definition at line 797 of file amesos_ccolamd_l.c.
| #define COL_IS_DEAD_PRINCIPAL | ( | c | ) | (Col [c].start == DEAD_PRINCIPAL) |
Definition at line 798 of file amesos_ccolamd_l.c.
| #define KILL_ROW | ( | r | ) | { Row [r].shared2.mark = DEAD ; } |
Definition at line 799 of file amesos_ccolamd_l.c.
| #define KILL_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_PRINCIPAL ; } |
Definition at line 800 of file amesos_ccolamd_l.c.
| #define KILL_NON_PRINCIPAL_COL | ( | c | ) | { Col [c].start = DEAD_NON_PRINCIPAL ; } |
Definition at line 801 of file amesos_ccolamd_l.c.
| #define INDEX | ( | i | ) | (i) |
Definition at line 813 of file amesos_ccolamd_l.c.
| #define PRINTF | ( | params | ) | { if (amesos_ccolamd_printf != NULL) (void) amesos_ccolamd_printf params ; } |
Definition at line 817 of file amesos_ccolamd_l.c.
| #define DEBUG0 | ( | params | ) | ; |
Definition at line 900 of file amesos_ccolamd_l.c.
| #define DEBUG1 | ( | params | ) | ; |
Definition at line 901 of file amesos_ccolamd_l.c.
| #define DEBUG2 | ( | params | ) | ; |
Definition at line 902 of file amesos_ccolamd_l.c.
| #define DEBUG3 | ( | params | ) | ; |
Definition at line 903 of file amesos_ccolamd_l.c.
| #define DEBUG4 | ( | params | ) | ; |
Definition at line 904 of file amesos_ccolamd_l.c.
| #define ASSERT | ( | expression | ) |
Definition at line 906 of file amesos_ccolamd_l.c.
| #define CCOLAMD_C | ( | n_col, | |
| ok | |||
| ) | ((t_mult (t_add (n_col, 1, ok), sizeof (CColamd_Col), ok) / sizeof (Int))) |
Definition at line 1068 of file amesos_ccolamd_l.c.
| #define CCOLAMD_R | ( | n_row, | |
| ok | |||
| ) | ((t_mult (t_add (n_row, 1, ok), sizeof (CColamd_Row), ok) / sizeof (Int))) |
Definition at line 1071 of file amesos_ccolamd_l.c.
| typedef struct CColamd_Col_struct CColamd_Col |
| typedef struct CColamd_Row_struct CColamd_Row |
| PRIVATE Int init_rows_cols | ( | Int | n_row, |
| Int | n_col, | ||
| CColamd_Row | Row[], | ||
| CColamd_Col | Col[], | ||
| Int | A[], | ||
| Int | p[], | ||
| Int | stats[CCOLAMD_STATS] | ||
| ) |
Definition at line 2048 of file amesos_ccolamd_l.c.
| PRIVATE void init_scoring | ( | Int | n_row, |
| Int | n_col, | ||
| CColamd_Row | Row[], | ||
| CColamd_Col | Col[], | ||
| Int | A[], | ||
| Int | head[], | ||
| double | knobs[CCOLAMD_KNOBS], | ||
| Int * | p_n_row2, | ||
| Int * | p_n_col2, | ||
| Int * | p_max_deg, | ||
| Int | cmember[], | ||
| Int | n_cset, | ||
| Int | cset_start[], | ||
| Int | dead_cols[], | ||
| Int * | p_ndense_row, | ||
| Int * | p_nempty_row, | ||
| Int * | p_nnewlyempty_row, | ||
| Int * | p_ndense_col, | ||
| Int * | p_nempty_col, | ||
| Int * | p_nnewlyempty_col | ||
| ) |
Definition at line 2293 of file amesos_ccolamd_l.c.
| PRIVATE Int find_ordering | ( | Int | n_row, |
| Int | n_col, | ||
| Int | Alen, | ||
| CColamd_Row | Row[], | ||
| CColamd_Col | Col[], | ||
| Int | A[], | ||
| Int | head[], | ||
| Int | max_deg, | ||
| Int | pfree, | ||
| Int | cset[], | ||
| Int | cset_start[], | ||
| Int | cmember[], | ||
| Int | Front_npivcol[], | ||
| Int | Front_nrows[], | ||
| Int | Front_ncols[], | ||
| Int | Front_parent[], | ||
| Int | Front_cols[], | ||
| Int * | p_nfr, | ||
| Int | aggressive, | ||
| Int | InFront[], | ||
| Int | order_for_lu | ||
| ) |
Definition at line 2579 of file amesos_ccolamd_l.c.
| PRIVATE void detect_super_cols | ( | CColamd_Col | Col[], |
| Int | A[], | ||
| Int | head[], | ||
| Int | row_start, | ||
| Int | row_length, | ||
| Int | in_set[] | ||
| ) |
Definition at line 3407 of file amesos_ccolamd_l.c.
| PRIVATE Int garbage_collection | ( | Int | n_row, |
| Int | n_col, | ||
| CColamd_Row | Row[], | ||
| CColamd_Col | Col[], | ||
| Int | A[], | ||
| Int * | pfree | ||
| ) |
Definition at line 3579 of file amesos_ccolamd_l.c.
Definition at line 3711 of file amesos_ccolamd_l.c.
Definition at line 3748 of file amesos_ccolamd_l.c.
|
static |
Definition at line 1050 of file amesos_ccolamd_l.c.
|
static |
Definition at line 1057 of file amesos_ccolamd_l.c.
Definition at line 1081 of file amesos_ccolamd_l.c.
Definition at line 1118 of file amesos_ccolamd_l.c.
| PUBLIC void CCOLAMD_set_defaults | ( | double | knobs[CCOLAMD_KNOBS] | ) |
Definition at line 1149 of file amesos_ccolamd_l.c.
| PUBLIC Int CSYMAMD_MAIN | ( | Int | n, |
| Int | A[], | ||
| Int | p[], | ||
| Int | perm[], | ||
| double | knobs[CCOLAMD_KNOBS], | ||
| Int | stats[CCOLAMD_STATS], | ||
| void *(*)(size_t, size_t) | allocate, | ||
| void(*)(void *) | release, | ||
| Int | cmember[], | ||
| Int | stype | ||
| ) |
Definition at line 1179 of file amesos_ccolamd_l.c.
| PUBLIC Int CCOLAMD_MAIN | ( | Int | n_row, |
| Int | n_col, | ||
| Int | Alen, | ||
| Int | A[], | ||
| Int | p[], | ||
| double | knobs[CCOLAMD_KNOBS], | ||
| Int | stats[CCOLAMD_STATS], | ||
| Int | cmember[] | ||
| ) |
Definition at line 1510 of file amesos_ccolamd_l.c.
| PUBLIC Int CCOLAMD_2 | ( | Int | n_row, |
| Int | n_col, | ||
| Int | Alen, | ||
| Int | A[], | ||
| Int | p[], | ||
| double | knobs[CCOLAMD_KNOBS], | ||
| Int | stats[CCOLAMD_STATS], | ||
| Int | Front_npivcol[], | ||
| Int | Front_nrows[], | ||
| Int | Front_ncols[], | ||
| Int | Front_parent[], | ||
| Int | Front_cols[], | ||
| Int * | p_nfr, | ||
| Int | InFront[], | ||
| Int | cmember[] | ||
| ) |
Definition at line 1539 of file amesos_ccolamd_l.c.
Definition at line 2006 of file amesos_ccolamd_l.c.
Definition at line 2019 of file amesos_ccolamd_l.c.
Definition at line 3892 of file amesos_ccolamd_l.c.
| GLOBAL void CCOLAMD_fsize | ( | Int | nn, |
| Int | Fsize[], | ||
| Int | Fnrows[], | ||
| Int | Fncols[], | ||
| Int | Parent[], | ||
| Int | Npiv[] | ||
| ) |
Definition at line 3929 of file amesos_ccolamd_l.c.
| GLOBAL void CCOLAMD_postorder | ( | Int | nn, |
| Int | Parent[], | ||
| Int | Nv[], | ||
| Int | Fsize[], | ||
| Int | Order[], | ||
| Int | Child[], | ||
| Int | Sibling[], | ||
| Int | Stack[], | ||
| Int | Front_cols[], | ||
| Int | cmember[] | ||
| ) |
Definition at line 3989 of file amesos_ccolamd_l.c.
1.8.6