SCM

SCM Repository

[matrix] Annotation of /pkg/Matrix/src/CHOLMOD/Include/cholmod_partition.h
ViewVC logotype

Annotation of /pkg/Matrix/src/CHOLMOD/Include/cholmod_partition.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1876 - (view) (download) (as text)
Original Path: pkg/src/CHOLMOD/Include/cholmod_partition.h

1 : bates 912 /* ========================================================================== */
2 :     /* === Include/cholmod_partition.h ========================================== */
3 :     /* ========================================================================== */
4 :    
5 :     /* -----------------------------------------------------------------------------
6 : bates 1876 * CHOLMOD/Include/cholmod_partition.h.
7 : bates 1515 * Copyright (C) 2005-2006, Univ. of Florida. Author: Timothy A. Davis
8 : bates 912 * CHOLMOD/Include/cholmod_partition.h is licensed under Version 2.1 of the GNU
9 :     * Lesser General Public License. See lesser.txt for a text of the license.
10 :     * CHOLMOD is also available under other licenses; contact authors for details.
11 :     * http://www.cise.ufl.edu/research/sparse
12 :     * -------------------------------------------------------------------------- */
13 :    
14 :     /* CHOLMOD Partition module.
15 :     *
16 :     * Graph partitioning and graph-partition-based orderings. Includes an
17 :     * interface to CCOLAMD and CSYMAMD, constrained minimum degree ordering
18 :     * methods which order a matrix following constraints determined via nested
19 :     * dissection.
20 :     *
21 :     * cholmod_nested_dissection CHOLMOD nested dissection ordering
22 :     * cholmod_metis METIS nested dissection ordering (METIS_NodeND)
23 :     * cholmod_ccolamd interface to CCOLAMD ordering
24 :     * cholmod_csymamd interface to CSYMAMD ordering
25 : bates 1515 * cholmod_camd interface to CAMD ordering
26 : bates 912 * cholmod_bisect graph partitioner (currently based on METIS)
27 :     * cholmod_metis_bisector direct interface to METIS_NodeComputeSeparator
28 :     *
29 : bates 1515 * Requires the Core and Cholesky modules, and three packages: METIS, CAMD,
30 :     * and CCOLAMD. Optionally used by the Cholesky module.
31 : bates 912 *
32 : bates 1515 * Note that METIS does not have a version that uses UF_long integers. If you
33 : bates 912 * try to use cholmod_nested_dissection, cholmod_metis, cholmod_bisect, or
34 :     * cholmod_metis_bisector on a matrix that is too large, an error code will be
35 : bates 1515 * returned. METIS does have an "idxtype", which could be redefined as UF_long,
36 :     * if you wish to edit METIS or use compile-time flags to redefine idxtype.
37 : bates 912 */
38 :    
39 :     #ifndef CHOLMOD_PARTITION_H
40 :     #define CHOLMOD_PARTITION_H
41 :    
42 :     #include "cholmod_core.h"
43 :    
44 :     /* -------------------------------------------------------------------------- */
45 :     /* cholmod_nested_dissection */
46 :     /* -------------------------------------------------------------------------- */
47 :    
48 :     /* Order A, AA', or A(:,f)*A(:,f)' using CHOLMOD's nested dissection method
49 :     * (METIS's node bisector applied recursively to compute the separator tree
50 :     * and constraint sets, followed by CCOLAMD using the constraints). Usually
51 :     * finds better orderings than METIS_NodeND, but takes longer.
52 :     */
53 :    
54 : bates 1515 UF_long cholmod_nested_dissection /* returns # of components */
55 : bates 912 (
56 :     /* ---- input ---- */
57 :     cholmod_sparse *A, /* matrix to order */
58 :     int *fset, /* subset of 0:(A->ncol)-1 */
59 :     size_t fsize, /* size of fset */
60 :     /* ---- output --- */
61 :     int *Perm, /* size A->nrow, output permutation */
62 :     int *CParent, /* size A->nrow. On output, CParent [c] is the parent
63 :     * of component c, or EMPTY if c is a root, and where
64 :     * c is in the range 0 to # of components minus 1 */
65 :     int *Cmember, /* size A->nrow. Cmember [j] = c if node j of A is
66 :     * in component c */
67 :     /* --------------- */
68 :     cholmod_common *Common
69 :     ) ;
70 :    
71 : bates 1515 UF_long cholmod_l_nested_dissection (cholmod_sparse *, UF_long *, size_t,
72 :     UF_long *, UF_long *, UF_long *, cholmod_common *) ;
73 : bates 912
74 :     /* -------------------------------------------------------------------------- */
75 :     /* cholmod_metis */
76 :     /* -------------------------------------------------------------------------- */
77 :    
78 :     /* Order A, AA', or A(:,f)*A(:,f)' using METIS_NodeND. */
79 :    
80 :     int cholmod_metis
81 :     (
82 :     /* ---- input ---- */
83 :     cholmod_sparse *A, /* matrix to order */
84 :     int *fset, /* subset of 0:(A->ncol)-1 */
85 :     size_t fsize, /* size of fset */
86 :     int postorder, /* if TRUE, follow with etree or coletree postorder */
87 :     /* ---- output --- */
88 :     int *Perm, /* size A->nrow, output permutation */
89 :     /* --------------- */
90 :     cholmod_common *Common
91 :     ) ;
92 :    
93 : bates 1515 int cholmod_l_metis (cholmod_sparse *, UF_long *, size_t, int, UF_long *,
94 : bates 912 cholmod_common *) ;
95 :    
96 :     /* -------------------------------------------------------------------------- */
97 :     /* cholmod_ccolamd */
98 :     /* -------------------------------------------------------------------------- */
99 :    
100 :     /* Order AA' or A(:,f)*A(:,f)' using CCOLAMD. */
101 :    
102 :     int cholmod_ccolamd
103 :     (
104 :     /* ---- input ---- */
105 :     cholmod_sparse *A, /* matrix to order */
106 :     int *fset, /* subset of 0:(A->ncol)-1 */
107 :     size_t fsize, /* size of fset */
108 :     int *Cmember, /* size A->nrow. Cmember [i] = c if row i is in the
109 :     * constraint set c. c must be >= 0. The # of
110 :     * constraint sets is max (Cmember) + 1. If Cmember is
111 :     * NULL, then it is interpretted as Cmember [i] = 0 for
112 :     * all i */
113 :     /* ---- output --- */
114 :     int *Perm, /* size A->nrow, output permutation */
115 :     /* --------------- */
116 :     cholmod_common *Common
117 :     ) ;
118 :    
119 : bates 1515 int cholmod_l_ccolamd (cholmod_sparse *, UF_long *, size_t, UF_long *,
120 :     UF_long *, cholmod_common *) ;
121 : bates 912
122 :     /* -------------------------------------------------------------------------- */
123 :     /* cholmod_csymamd */
124 :     /* -------------------------------------------------------------------------- */
125 :    
126 :     /* Order A using CSYMAMD. */
127 :    
128 :     int cholmod_csymamd
129 :     (
130 :     /* ---- input ---- */
131 :     cholmod_sparse *A, /* matrix to order */
132 :     /* ---- output --- */
133 :     int *Cmember, /* size nrow. see cholmod_ccolamd above */
134 :     int *Perm, /* size A->nrow, output permutation */
135 :     /* --------------- */
136 :     cholmod_common *Common
137 :     ) ;
138 :    
139 : bates 1515 int cholmod_l_csymamd (cholmod_sparse *, UF_long *, UF_long *,
140 :     cholmod_common *) ;
141 : bates 912
142 :     /* -------------------------------------------------------------------------- */
143 : bates 1515 /* cholmod_camd */
144 :     /* -------------------------------------------------------------------------- */
145 :    
146 :     /* Order A using CAMD. */
147 :    
148 :     int cholmod_camd
149 :     (
150 :     /* ---- input ---- */
151 :     cholmod_sparse *A, /* matrix to order */
152 :     int *fset, /* subset of 0:(A->ncol)-1 */
153 :     size_t fsize, /* size of fset */
154 :     /* ---- output --- */
155 :     int *Cmember, /* size nrow. see cholmod_ccolamd above */
156 :     int *Perm, /* size A->nrow, output permutation */
157 :     /* --------------- */
158 :     cholmod_common *Common
159 :     ) ;
160 :    
161 :     int cholmod_l_camd (cholmod_sparse *, UF_long *, size_t, UF_long *, UF_long *,
162 :     cholmod_common *) ;
163 :    
164 :     /* -------------------------------------------------------------------------- */
165 : bates 912 /* cholmod_bisect */
166 :     /* -------------------------------------------------------------------------- */
167 :    
168 :     /* Finds a node bisector of A, A*A', A(:,f)*A(:,f)'. */
169 :    
170 : bates 1515 UF_long cholmod_bisect /* returns # of nodes in separator */
171 : bates 912 (
172 :     /* ---- input ---- */
173 :     cholmod_sparse *A, /* matrix to bisect */
174 :     int *fset, /* subset of 0:(A->ncol)-1 */
175 :     size_t fsize, /* size of fset */
176 :     int compress, /* if TRUE, compress the graph first */
177 :     /* ---- output --- */
178 :     int *Partition, /* size A->nrow. Node i is in the left graph if
179 :     * Partition [i] = 0, the right graph if 1, and in the
180 :     * separator if 2. */
181 :     /* --------------- */
182 :     cholmod_common *Common
183 :     ) ;
184 :    
185 : bates 1515 UF_long cholmod_l_bisect (cholmod_sparse *, UF_long *, size_t, int, UF_long *,
186 : bates 912 cholmod_common *) ;
187 :    
188 :     /* -------------------------------------------------------------------------- */
189 :     /* cholmod_metis_bisector */
190 :     /* -------------------------------------------------------------------------- */
191 :    
192 :     /* Find a set of nodes that bisects the graph of A or AA' (direct interface
193 :     * to METIS_NodeComputeSeparator). */
194 :    
195 : bates 1515 UF_long cholmod_metis_bisector /* returns separator size */
196 : bates 912 (
197 :     /* ---- input ---- */
198 :     cholmod_sparse *A, /* matrix to bisect */
199 :     int *Anw, /* size A->nrow, node weights */
200 :     int *Aew, /* size nz, edge weights */
201 :     /* ---- output --- */
202 :     int *Partition, /* size A->nrow. see cholmod_bisect above. */
203 :     /* --------------- */
204 :     cholmod_common *Common
205 :     ) ;
206 :    
207 : bates 1515 UF_long cholmod_l_metis_bisector (cholmod_sparse *, UF_long *, UF_long *,
208 :     UF_long *, cholmod_common *) ;
209 : bates 912
210 : bates 1515 /* -------------------------------------------------------------------------- */
211 :     /* cholmod_collapse_septree */
212 :     /* -------------------------------------------------------------------------- */
213 :    
214 :     /* Collapse nodes in a separator tree. */
215 :    
216 :     UF_long cholmod_collapse_septree
217 :     (
218 :     /* ---- input ---- */
219 :     size_t n, /* # of nodes in the graph */
220 :     size_t ncomponents, /* # of nodes in the separator tree (must be <= n) */
221 :     double nd_oksep, /* collapse if #sep >= nd_oksep * #nodes in subtree */
222 :     size_t nd_small, /* collapse if #nodes in subtree < nd_small */
223 :     /* ---- in/out --- */
224 :     int *CParent, /* size ncomponents; from cholmod_nested_dissection */
225 :     int *Cmember, /* size n; from cholmod_nested_dissection */
226 :     /* --------------- */
227 :     cholmod_common *Common
228 :     ) ;
229 :    
230 :     UF_long cholmod_l_collapse_septree (size_t, size_t, double, size_t, UF_long *,
231 :     UF_long *, cholmod_common *) ;
232 :    
233 : bates 912 #endif

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge