comparison liboctave/UMFPACK/UMFPACK/Include/umfpack_col_to_triplet.h @ 5164:57077d0ddc8e

[project @ 2005-02-25 19:55:24 by jwe]
author jwe
date Fri, 25 Feb 2005 19:55:28 +0000
parents
children
comparison
equal deleted inserted replaced
5163:9f3299378193 5164:57077d0ddc8e
1 /* ========================================================================== */
2 /* === umfpack_col_to_triplet =============================================== */
3 /* ========================================================================== */
4
5 /* -------------------------------------------------------------------------- */
6 /* UMFPACK Version 4.4, Copyright (c) 2005 by Timothy A. Davis. CISE Dept, */
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_col_to_triplet
12 (
13 int n_col,
14 const int Ap [ ],
15 int Tj [ ]
16 ) ;
17
18 long umfpack_dl_col_to_triplet
19 (
20 long n_col,
21 const long Ap [ ],
22 long Tj [ ]
23 ) ;
24
25 int umfpack_zi_col_to_triplet
26 (
27 int n_col,
28 const int Ap [ ],
29 int Tj [ ]
30 ) ;
31
32 long umfpack_zl_col_to_triplet
33 (
34 long n_col,
35 const long Ap [ ],
36 long Tj [ ]
37 ) ;
38
39 /*
40 double int Syntax:
41
42 #include "umfpack.h"
43 int n_col, *Tj, *Ap, status ;
44 status = umfpack_di_col_to_triplet (n_col, Ap, Tj) ;
45
46 double long Syntax:
47
48 #include "umfpack.h"
49 long n_col, *Tj, *Ap, status ;
50 status = umfpack_dl_col_to_triplet (n_col, Ap, Tj) ;
51
52 complex int Syntax:
53
54 #include "umfpack.h"
55 int n_col, *Tj, *Ap, status ;
56 status = umfpack_zi_col_to_triplet (n_col, Ap, Tj) ;
57
58 complex long Syntax:
59
60 #include "umfpack.h"
61 long n_col, *Tj, *Ap, status ;
62 status = umfpack_zl_col_to_triplet (n_col, Ap, Tj) ;
63
64 Purpose:
65
66 Converts a column-oriented matrix to a triplet form. Only the column
67 pointers, Ap, are required, and only the column indices of the triplet form
68 are constructed. This routine is the opposite of umfpack_*_triplet_to_col.
69 The matrix may be singular and/or rectangular. Analogous to [i, Tj, x] =
70 find (A) in MATLAB, except that zero entries present in the column-form of
71 A are present in the output, and i and x are not created (those are just Ai
72 and Ax+Az*1i, respectively, for a column-form matrix A).
73
74 Returns:
75
76 UMFPACK_OK if successful
77 UMFPACK_ERROR_argument_missing if Ap or Tj is missing
78 UMFPACK_ERROR_n_nonpositive if n_col <= 0
79 UMFPACK_ERROR_invalid_matrix if Ap [n_col] < 0, Ap [0] != 0, or
80 Ap [j] > Ap [j+1] for any j in the range 0 to n-1.
81 Unsorted columns and duplicate entries do not cause an error (these would
82 only be evident by examining Ai). Empty rows and columns are OK.
83
84 Arguments:
85
86 Int n_col ; Input argument, not modified.
87
88 A is an n_row-by-n_col matrix. Restriction: n_col > 0.
89 (n_row is not required)
90
91 Int Ap [n_col+1] ; Input argument, not modified.
92
93 The column pointers of the column-oriented form of the matrix. See
94 umfpack_*_*symbolic for a description. The number of entries in
95 the matrix is nz = Ap [n_col]. Restrictions on Ap are the same as those
96 for umfpack_*_transpose. Ap [0] must be zero, nz must be >= 0, and
97 Ap [j] <= Ap [j+1] and Ap [j] <= Ap [n_col] must be true for all j in
98 the range 0 to n_col-1. Empty columns are OK (that is, Ap [j] may equal
99 Ap [j+1] for any j in the range 0 to n_col-1).
100
101 Int Tj [nz] ; Output argument.
102
103 Tj is an integer array of size nz on input, where nz = Ap [n_col].
104 Suppose the column-form of the matrix is held in Ap, Ai, Ax, and Az
105 (see umfpack_*_*symbolic for a description). Then on output, the
106 triplet form of the same matrix is held in Ai (row indices), Tj (column
107 indices), and Ax (numerical values). Note, however, that this routine
108 does not require Ai and Ax (or Az for the complex version) in order to
109 do the conversion.
110 */