amd_control.c 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* ========================================================================= */
  2. /* === AMD_control ========================================================= */
  3. /* ========================================================================= */
  4. /* ------------------------------------------------------------------------- */
  5. /* AMD, Copyright (c) Timothy A. Davis, */
  6. /* Patrick R. Amestoy, and Iain S. Duff. See ../README.txt for License. */
  7. /* email: davis at cise.ufl.edu CISE Department, Univ. of Florida. */
  8. /* web: http://www.cise.ufl.edu/research/sparse/amd */
  9. /* ------------------------------------------------------------------------- */
  10. /* User-callable. Prints the control parameters for AMD. See amd.h
  11. * for details. If the Control array is not present, the defaults are
  12. * printed instead.
  13. */
  14. #include "amd_internal.h"
  15. GLOBAL void AMD_control
  16. (
  17. double Control [ ]
  18. )
  19. {
  20. double alpha ;
  21. Int aggressive ;
  22. if (Control != (double *) NULL)
  23. {
  24. alpha = Control [AMD_DENSE] ;
  25. aggressive = Control [AMD_AGGRESSIVE] != 0 ;
  26. }
  27. else
  28. {
  29. alpha = AMD_DEFAULT_DENSE ;
  30. aggressive = AMD_DEFAULT_AGGRESSIVE ;
  31. }
  32. PRINTF (("\nAMD version %d.%d.%d, %s: approximate minimum degree ordering\n"
  33. " dense row parameter: %g\n", AMD_MAIN_VERSION, AMD_SUB_VERSION,
  34. AMD_SUBSUB_VERSION, AMD_DATE, alpha)) ;
  35. if (alpha < 0)
  36. {
  37. PRINTF ((" no rows treated as dense\n")) ;
  38. }
  39. else
  40. {
  41. PRINTF ((
  42. " (rows with more than max (%g * sqrt (n), 16) entries are\n"
  43. " considered \"dense\", and placed last in output permutation)\n",
  44. alpha)) ;
  45. }
  46. if (aggressive)
  47. {
  48. PRINTF ((" aggressive absorption: yes\n")) ;
  49. }
  50. else
  51. {
  52. PRINTF ((" aggressive absorption: no\n")) ;
  53. }
  54. PRINTF ((" size of AMD integer: %d\n\n", sizeof (Int))) ;
  55. }