1 /* ========================================================================= */
2 /* === AMD_control ========================================================= */
3 /* ========================================================================= */
4 
5 /* ------------------------------------------------------------------------- */
6 /* AMD, Copyright (c) Timothy A. Davis,					     */
7 /* Patrick R. Amestoy, and Iain S. Duff.  See ../README.txt for License.     */
8 /* email: DrTimothyAldenDavis@gmail.com                                      */
9 /* ------------------------------------------------------------------------- */
10 
11 /* User-callable.  Prints the control parameters for AMD.  See amd.h
12  * for details.  If the Control array is not present, the defaults are
13  * printed instead.
14  */
15 
16 module amd_control;
17 
18 nothrow @nogc extern(C):
19 
20 import glob_opts;
21 import amd_internal;
22 import amd;
23 import SuiteSparse_config;
24 
25 void AMD_control
26 (
27     c_float *Control
28 )
29 {
30     c_float alpha ;
31     Int aggressive ;
32 
33     if (Control != cast(c_float *) NULL)
34     {
35 	alpha = Control [AMD_DENSE] ;
36 	aggressive = Control [AMD_AGGRESSIVE] != 0 ;
37     }
38     else
39     {
40 	alpha = AMD_DEFAULT_DENSE ;
41 	aggressive = AMD_DEFAULT_AGGRESSIVE ;
42     }
43 
44     //SUITESPARSE_PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n   dense row parameter: %g\n", // todo : later
45     //                    AMD_MAIN_VERSION, AMD_SUB_VERSION, AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ;
46 
47     if (alpha < 0)
48     {
49 	SUITESPARSE_PRINTF (("    no rows treated as dense\n")) ;
50     }
51     else
52     {
53 	//SUITESPARSE_PRINTF (("    (rows with more than max (%g * sqrt (n), 16) entries are\n   considered \"dense\", and placed last in output permutation)\n", alpha)) ; // todo : later
54     }
55 
56     if (aggressive)
57     {
58 	SUITESPARSE_PRINTF (("    aggressive absorption:  yes\n")) ;
59     }
60     else
61     {
62 	SUITESPARSE_PRINTF (("    aggressive absorption:  no\n")) ;
63     }
64 
65     //SUITESPARSE_PRINTF (("    size of AMD integer: %d\n\n", Int.sizeof)) ; // todo : later
66 }