~ubuntu-branches/ubuntu/natty/suitesparse/natty

« back to all changes in this revision

Viewing changes to UMFPACK/Include/umfpack_report_matrix.h

  • Committer: Bazaar Package Importer
  • Author(s): Christophe Prud'homme
  • Date: 2006-12-22 10:16:15 UTC
  • Revision ID: james.westby@ubuntu.com-20061222101615-2ohaj8902oix2rnk
Tags: upstream-2.3.1
ImportĀ upstreamĀ versionĀ 2.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ========================================================================== */
 
2
/* === umfpack_report_matrix ================================================ */
 
3
/* ========================================================================== */
 
4
 
 
5
/* -------------------------------------------------------------------------- */
 
6
/* UMFPACK Version 5.0, Copyright (c) 1995-2006 by Timothy A. Davis.  CISE,   */
 
7
/* Univ. of Florida.  All Rights Reserved.  See ../Doc/License for License.   */
 
8
/* web: http://www.cise.ufl.edu/research/sparse/umfpack                       */
 
9
/* -------------------------------------------------------------------------- */
 
10
 
 
11
int umfpack_di_report_matrix
 
12
(
 
13
    int n_row,
 
14
    int n_col,
 
15
    const int Ap [ ],
 
16
    const int Ai [ ],
 
17
    const double Ax [ ],
 
18
    int col_form,
 
19
    const double Control [UMFPACK_CONTROL]
 
20
) ;
 
21
 
 
22
UF_long umfpack_dl_report_matrix
 
23
(
 
24
    UF_long n_row,
 
25
    UF_long n_col,
 
26
    const UF_long Ap [ ],
 
27
    const UF_long Ai [ ],
 
28
    const double Ax [ ],
 
29
    UF_long col_form,
 
30
    const double Control [UMFPACK_CONTROL]
 
31
) ;
 
32
 
 
33
int umfpack_zi_report_matrix
 
34
(
 
35
    int n_row,
 
36
    int n_col,
 
37
    const int Ap [ ],
 
38
    const int Ai [ ],
 
39
    const double Ax [ ], const double Az [ ],
 
40
    int col_form,
 
41
    const double Control [UMFPACK_CONTROL]
 
42
) ;
 
43
 
 
44
UF_long umfpack_zl_report_matrix
 
45
(
 
46
    UF_long n_row,
 
47
    UF_long n_col,
 
48
    const UF_long Ap [ ],
 
49
    const UF_long Ai [ ],
 
50
    const double Ax [ ], const double Az [ ],
 
51
    UF_long col_form,
 
52
    const double Control [UMFPACK_CONTROL]
 
53
) ;
 
54
 
 
55
/*
 
56
double int Syntax:
 
57
 
 
58
    #include "umfpack.h"
 
59
    int n_row, n_col, *Ap, *Ai, status ;
 
60
    double *Ax, Control [UMFPACK_CONTROL] ;
 
61
    status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;
 
62
or:
 
63
    status = umfpack_di_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;
 
64
 
 
65
double UF_long Syntax:
 
66
 
 
67
    #include "umfpack.h"
 
68
    UF_long n_row, n_col, *Ap, *Ai, status ;
 
69
    double *Ax, Control [UMFPACK_CONTROL] ;
 
70
    status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 1, Control) ;
 
71
or:
 
72
    status = umfpack_dl_report_matrix (n_row, n_col, Ap, Ai, Ax, 0, Control) ;
 
73
 
 
74
complex int Syntax:
 
75
 
 
76
    #include "umfpack.h"
 
77
    int n_row, n_col, *Ap, *Ai, status ;
 
78
    double *Ax, *Az, Control [UMFPACK_CONTROL] ;
 
79
    status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,
 
80
        Control) ;
 
81
or:
 
82
    status = umfpack_zi_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,
 
83
        Control) ;
 
84
 
 
85
complex UF_long Syntax:
 
86
 
 
87
    #include "umfpack.h"
 
88
    UF_long n_row, n_col, *Ap, *Ai, status ;
 
89
    double *Ax, Control [UMFPACK_CONTROL] ;
 
90
    status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 1,
 
91
        Control) ;
 
92
or:
 
93
    status = umfpack_zl_report_matrix (n_row, n_col, Ap, Ai, Ax, Az, 0,
 
94
        Control) ;
 
95
 
 
96
packed complex Syntax:
 
97
 
 
98
    Same as above, except Az is NULL.
 
99
 
 
100
Purpose:
 
101
 
 
102
    Verifies and prints a row or column-oriented sparse matrix.
 
103
 
 
104
Returns:
 
105
 
 
106
    UMFPACK_OK if Control [UMFPACK_PRL] <= 2 (the input is not checked).
 
107
 
 
108
    Otherwise (where n is n_col for the column form and n_row for row
 
109
    and let ni be n_row for the column form and n_col for row):
 
110
 
 
111
    UMFPACK_OK if the matrix is valid.
 
112
 
 
113
    UMFPACK_ERROR_n_nonpositive if n_row <= 0 or n_col <= 0.
 
114
    UMFPACK_ERROR_argument_missing if Ap and/or Ai are missing.
 
115
    UMFPACK_ERROR_invalid_matrix if Ap [n] < 0, if Ap [0] is not zero,
 
116
        if Ap [j+1] < Ap [j] for any j in the range 0 to n-1,
 
117
        if any row index in Ai is not in the range 0 to ni-1, or
 
118
        if the row indices in any column are not in
 
119
        ascending order, or contain duplicates.
 
120
    UMFPACK_ERROR_out_of_memory if out of memory.
 
121
 
 
122
Arguments:
 
123
 
 
124
    Int n_row ;         Input argument, not modified.
 
125
    Int n_col ;         Input argument, not modified.
 
126
 
 
127
        A is an n_row-by-n_row matrix.  Restriction: n_row > 0 and n_col > 0.
 
128
 
 
129
    Int Ap [n+1] ;      Input argument, not modified.
 
130
 
 
131
        n is n_row for a row-form matrix, and n_col for a column-form matrix.
 
132
 
 
133
        Ap is an integer array of size n+1.  If col_form is true (nonzero),
 
134
        then on input, it holds the "pointers" for the column form of the
 
135
        sparse matrix A.  The row indices of column j of the matrix A are held
 
136
        in Ai [(Ap [j]) ... (Ap [j+1]-1)].  Otherwise, Ap holds the
 
137
        row pointers, and the column indices of row j of the matrix are held
 
138
        in Ai [(Ap [j]) ... (Ap [j+1]-1)].
 
139
 
 
140
        The first entry, Ap [0], must be zero, and Ap [j] <= Ap [j+1] must hold
 
141
        for all j in the range 0 to n-1.  The value nz = Ap [n] is thus the
 
142
        total number of entries in the pattern of the matrix A.
 
143
 
 
144
    Int Ai [nz] ;       Input argument, not modified, of size nz = Ap [n].
 
145
 
 
146
        If col_form is true (nonzero), then the nonzero pattern (row indices)
 
147
        for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)].  Row indices
 
148
        must be in the range 0 to n_row-1 (the matrix is 0-based).
 
149
 
 
150
        Otherwise, the nonzero pattern (column indices) for row j is stored in
 
151
        Ai [(Ap [j]) ... (Ap [j+1]-1)]. Column indices must be in the range 0
 
152
        to n_col-1 (the matrix is 0-based).
 
153
 
 
154
    double Ax [nz] ;    Input argument, not modified, of size nz = Ap [n].
 
155
                        Size 2*nz for packed complex case.
 
156
 
 
157
        The numerical values of the sparse matrix A.
 
158
 
 
159
        If col_form is true (nonzero), then the nonzero pattern (row indices)
 
160
        for column j is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the
 
161
        corresponding (real) numerical values are stored in
 
162
        Ax [(Ap [j]) ... (Ap [j+1]-1)].  The imaginary parts are stored in
 
163
        Az [(Ap [j]) ... (Ap [j+1]-1)], for the complex versions
 
164
        (see below if Az is NULL).
 
165
 
 
166
        Otherwise, the nonzero pattern (column indices) for row j
 
167
        is stored in Ai [(Ap [j]) ... (Ap [j+1]-1)], and the corresponding
 
168
        (real) numerical values are stored in Ax [(Ap [j]) ... (Ap [j+1]-1)].
 
169
        The imaginary parts are stored in Az [(Ap [j]) ... (Ap [j+1]-1)],
 
170
        for the complex versions (see below if Az is NULL).
 
171
 
 
172
        No numerical values are printed if Ax is NULL.
 
173
 
 
174
    double Az [nz] ;    Input argument, not modified, for complex versions.
 
175
 
 
176
        The imaginary values of the sparse matrix A.   See the description
 
177
        of Ax, above.
 
178
 
 
179
        If Az is NULL, then both real
 
180
        and imaginary parts are contained in Ax[0..2*nz-1], with Ax[2*k]
 
181
        and Ax[2*k+1] being the real and imaginary part of the kth entry.
 
182
 
 
183
    Int col_form ;      Input argument, not modified.
 
184
 
 
185
        The matrix is in row-oriented form if form is col_form is false (0).
 
186
        Otherwise, the matrix is in column-oriented form.
 
187
 
 
188
    double Control [UMFPACK_CONTROL] ;  Input argument, not modified.
 
189
 
 
190
        If a (double *) NULL pointer is passed, then the default control
 
191
        settings are used.  Otherwise, the settings are determined from the
 
192
        Control array.  See umfpack_*_defaults on how to fill the Control
 
193
        array with the default settings.  If Control contains NaN's, the
 
194
        defaults are used.  The following Control parameters are used:
 
195
 
 
196
        Control [UMFPACK_PRL]:  printing level.
 
197
 
 
198
            2 or less: no output.  returns silently without checking anything.
 
199
            3: fully check input, and print a short summary of its status
 
200
            4: as 3, but print first few entries of the input
 
201
            5: as 3, but print all of the input
 
202
            Default: 1
 
203
*/