~ubuntu-branches/ubuntu/saucy/python-scipy/saucy

« back to all changes in this revision

Viewing changes to Lib/sandbox/pysparse/amd/amd_control.c

  • Committer: Bazaar Package Importer
  • Author(s): Ondrej Certik
  • Date: 2008-06-16 22:58:01 UTC
  • mfrom: (2.1.24 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080616225801-irdhrpcwiocfbcmt
Tags: 0.6.0-12
* The description updated to match the current SciPy (Closes: #489149).
* Standards-Version bumped to 3.8.0 (no action needed)
* Build-Depends: netcdf-dev changed to libnetcdf-dev

Show diffs side-by-side

added added

removed removed

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