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 912 - (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 :     * CHOLMOD/Include/cholmod_partition.h. Version 0.6.
7 :     * Copyright (C) 2005, Univ. of Florida. Author: Timothy A. Davis
8 :     * 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 :     * cholmod_bisect graph partitioner (currently based on METIS)
26 :     * cholmod_metis_bisector direct interface to METIS_NodeComputeSeparator
27 :     *
28 :     * Requires the Core and Cholesky modules, and two packages: METIS and CCOLAMD.
29 :     * Optionally used by the Cholesky module.
30 :     *
31 :     * Note that METIS does not have a version that uses long integers. If you
32 :     * try to use cholmod_nested_dissection, cholmod_metis, cholmod_bisect, or
33 :     * cholmod_metis_bisector on a matrix that is too large, an error code will be
34 :     * returned.
35 :     */
36 :    
37 :     #ifndef CHOLMOD_PARTITION_H
38 :     #define CHOLMOD_PARTITION_H
39 :    
40 :     #include "cholmod_core.h"
41 :    
42 :     /* -------------------------------------------------------------------------- */
43 :     /* cholmod_nested_dissection */
44 :     /* -------------------------------------------------------------------------- */
45 :    
46 :     /* Order A, AA', or A(:,f)*A(:,f)' using CHOLMOD's nested dissection method
47 :     * (METIS's node bisector applied recursively to compute the separator tree
48 :     * and constraint sets, followed by CCOLAMD using the constraints). Usually
49 :     * finds better orderings than METIS_NodeND, but takes longer.
50 :     */
51 :    
52 :     long cholmod_nested_dissection /* returns # of components */
53 :     (
54 :     /* ---- input ---- */
55 :     cholmod_sparse *A, /* matrix to order */
56 :     int *fset, /* subset of 0:(A->ncol)-1 */
57 :     size_t fsize, /* size of fset */
58 :     /* ---- output --- */
59 :     int *Perm, /* size A->nrow, output permutation */
60 :     int *CParent, /* size A->nrow. On output, CParent [c] is the parent
61 :     * of component c, or EMPTY if c is a root, and where
62 :     * c is in the range 0 to # of components minus 1 */
63 :     int *Cmember, /* size A->nrow. Cmember [j] = c if node j of A is
64 :     * in component c */
65 :     /* --------------- */
66 :     cholmod_common *Common
67 :     ) ;
68 :    
69 :     long cholmod_l_nested_dissection (cholmod_sparse *, long *, size_t, long *,
70 :     long *, long *, cholmod_common *) ;
71 :    
72 :     /* -------------------------------------------------------------------------- */
73 :     /* cholmod_metis */
74 :     /* -------------------------------------------------------------------------- */
75 :    
76 :     /* Order A, AA', or A(:,f)*A(:,f)' using METIS_NodeND. */
77 :    
78 :     int cholmod_metis
79 :     (
80 :     /* ---- input ---- */
81 :     cholmod_sparse *A, /* matrix to order */
82 :     int *fset, /* subset of 0:(A->ncol)-1 */
83 :     size_t fsize, /* size of fset */
84 :     int postorder, /* if TRUE, follow with etree or coletree postorder */
85 :     /* ---- output --- */
86 :     int *Perm, /* size A->nrow, output permutation */
87 :     /* --------------- */
88 :     cholmod_common *Common
89 :     ) ;
90 :    
91 :     int cholmod_l_metis (cholmod_sparse *, long *, size_t, int, long *,
92 :     cholmod_common *) ;
93 :    
94 :     /* -------------------------------------------------------------------------- */
95 :     /* cholmod_ccolamd */
96 :     /* -------------------------------------------------------------------------- */
97 :    
98 :     /* Order AA' or A(:,f)*A(:,f)' using CCOLAMD. */
99 :    
100 :     int cholmod_ccolamd
101 :     (
102 :     /* ---- input ---- */
103 :     cholmod_sparse *A, /* matrix to order */
104 :     int *fset, /* subset of 0:(A->ncol)-1 */
105 :     size_t fsize, /* size of fset */
106 :     int *Cmember, /* size A->nrow. Cmember [i] = c if row i is in the
107 :     * constraint set c. c must be >= 0. The # of
108 :     * constraint sets is max (Cmember) + 1. If Cmember is
109 :     * NULL, then it is interpretted as Cmember [i] = 0 for
110 :     * all i */
111 :     /* ---- output --- */
112 :     int *Perm, /* size A->nrow, output permutation */
113 :     /* --------------- */
114 :     cholmod_common *Common
115 :     ) ;
116 :    
117 :     int cholmod_l_ccolamd (cholmod_sparse *, long *, size_t, long *, long *,
118 :     cholmod_common *) ;
119 :    
120 :     /* -------------------------------------------------------------------------- */
121 :     /* cholmod_csymamd */
122 :     /* -------------------------------------------------------------------------- */
123 :    
124 :     /* Order A using CSYMAMD. */
125 :    
126 :     int cholmod_csymamd
127 :     (
128 :     /* ---- input ---- */
129 :     cholmod_sparse *A, /* matrix to order */
130 :     /* ---- output --- */
131 :     int *Cmember, /* size nrow. see cholmod_ccolamd above */
132 :     int *Perm, /* size A->nrow, output permutation */
133 :     /* --------------- */
134 :     cholmod_common *Common
135 :     ) ;
136 :    
137 :     int cholmod_l_csymamd (cholmod_sparse *, long *, long *, cholmod_common *) ;
138 :    
139 :     /* -------------------------------------------------------------------------- */
140 :     /* cholmod_bisect */
141 :     /* -------------------------------------------------------------------------- */
142 :    
143 :     /* Finds a node bisector of A, A*A', A(:,f)*A(:,f)'. */
144 :    
145 :     long cholmod_bisect /* returns # of nodes in separator */
146 :     (
147 :     /* ---- input ---- */
148 :     cholmod_sparse *A, /* matrix to bisect */
149 :     int *fset, /* subset of 0:(A->ncol)-1 */
150 :     size_t fsize, /* size of fset */
151 :     int compress, /* if TRUE, compress the graph first */
152 :     /* ---- output --- */
153 :     int *Partition, /* size A->nrow. Node i is in the left graph if
154 :     * Partition [i] = 0, the right graph if 1, and in the
155 :     * separator if 2. */
156 :     /* --------------- */
157 :     cholmod_common *Common
158 :     ) ;
159 :    
160 :     long cholmod_l_bisect (cholmod_sparse *, long *, size_t, int, long *,
161 :     cholmod_common *) ;
162 :    
163 :     /* -------------------------------------------------------------------------- */
164 :     /* cholmod_metis_bisector */
165 :     /* -------------------------------------------------------------------------- */
166 :    
167 :     /* Find a set of nodes that bisects the graph of A or AA' (direct interface
168 :     * to METIS_NodeComputeSeparator). */
169 :    
170 :     long cholmod_metis_bisector /* returns separator size */
171 :     (
172 :     /* ---- input ---- */
173 :     cholmod_sparse *A, /* matrix to bisect */
174 :     int *Anw, /* size A->nrow, node weights */
175 :     int *Aew, /* size nz, edge weights */
176 :     /* ---- output --- */
177 :     int *Partition, /* size A->nrow. see cholmod_bisect above. */
178 :     /* --------------- */
179 :     cholmod_common *Common
180 :     ) ;
181 :    
182 :     long cholmod_l_metis_bisector (cholmod_sparse *, long *, long *, long *,
183 :     cholmod_common *) ;
184 :    
185 :     #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