1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/src/amd/amd_control.c Mon Dec 06 13:09:21 2010 +0100
1.3 @@ -0,0 +1,64 @@
1.4 +/* ========================================================================= */
1.5 +/* === AMD_control ========================================================= */
1.6 +/* ========================================================================= */
1.7 +
1.8 +/* ------------------------------------------------------------------------- */
1.9 +/* AMD, Copyright (c) Timothy A. Davis, */
1.10 +/* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */
1.11 +/* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */
1.12 +/* web: http://www.cise.ufl.edu/research/sparse/amd */
1.13 +/* ------------------------------------------------------------------------- */
1.14 +
1.15 +/* User-callable. Prints the control parameters for AMD. See amd.h
1.16 + * for details. If the Control array is not present, the defaults are
1.17 + * printed instead.
1.18 + */
1.19 +
1.20 +#include "amd_internal.h"
1.21 +
1.22 +GLOBAL void AMD_control
1.23 +(
1.24 + double Control [ ]
1.25 +)
1.26 +{
1.27 + double alpha ;
1.28 + Int aggressive ;
1.29 +
1.30 + if (Control != (double *) NULL)
1.31 + {
1.32 + alpha = Control [AMD_DENSE] ;
1.33 + aggressive = Control [AMD_AGGRESSIVE] != 0 ;
1.34 + }
1.35 + else
1.36 + {
1.37 + alpha = AMD_DEFAULT_DENSE ;
1.38 + aggressive = AMD_DEFAULT_AGGRESSIVE ;
1.39 + }
1.40 +
1.41 + PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n"
1.42 + " dense row parameter: %g\n", AMD_MAIN_VERSION, AMD_SUB_VERSION,
1.43 + AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ;
1.44 +
1.45 + if (alpha < 0)
1.46 + {
1.47 + PRINTF ((" no rows treated as dense\n")) ;
1.48 + }
1.49 + else
1.50 + {
1.51 + PRINTF ((
1.52 + " (rows with more than max (%g * sqrt (n), 16) entries are\n"
1.53 + " considered \"dense\", and placed last in output permutation)\n",
1.54 + alpha)) ;
1.55 + }
1.56 +
1.57 + if (aggressive)
1.58 + {
1.59 + PRINTF ((" aggressive absorption: yes\n")) ;
1.60 + }
1.61 + else
1.62 + {
1.63 + PRINTF ((" aggressive absorption: no\n")) ;
1.64 + }
1.65 +
1.66 + PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ;
1.67 +}