ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
struct.h
Go to the documentation of this file.
1
/*
2
* Copyright 1997, Regents of the University of Minnesota
3
*
4
* struct.h
5
*
6
* This file contains data structures for ILU routines.
7
*
8
* Started 9/26/95
9
* George
10
*
11
* $Id: struct.h,v 1.1 1998/11/27 17:59:31 karypis Exp $
12
*/
13
14
/* Undefine the following #define in order to use short int as the idxtype */
15
16
/* Indexes are as long as integers for now */
17
typedef
int
idxtype
;
18
19
#define MAXIDX (1<<8*sizeof(idxtype)-2)
20
21
/*************************************************************************
22
* The following data structure stores local search chain
23
**************************************************************************/
24
struct
ChainType
{
25
int
point
;
26
int
from
;
27
int
to
;
28
float
change
;
29
};
30
31
typedef
struct
ChainType
Chains
;
32
33
34
/*************************************************************************
35
* The following data structure stores key-value pair
36
**************************************************************************/
37
struct
KeyValueType
{
38
idxtype
key
;
39
idxtype
val
;
40
};
41
42
typedef
struct
KeyValueType
KeyValueType
;
43
44
45
/*************************************************************************
46
* The following data structure will hold a node of a doubly-linked list.
47
**************************************************************************/
48
struct
ListNodeType
{
49
int
id
;
/* The id value of the node */
50
struct
ListNodeType
*
prev
, *
next
;
/* It's a doubly-linked list */
51
};
52
53
typedef
struct
ListNodeType
ListNodeType
;
54
55
56
57
/*************************************************************************
58
* The following data structure is used to store the buckets for the
59
* refinment algorithms
60
**************************************************************************/
61
struct
PQueueType
{
62
int
type
;
/* The type of the representation used */
63
int
nnodes
;
64
int
maxnodes
;
65
int
mustfree
;
66
67
/* Linear array version of the data structures */
68
int
pgainspan
,
ngainspan
;
/* plus and negative gain span */
69
int
maxgain
;
70
ListNodeType
*
nodes
;
71
ListNodeType
**
buckets
;
72
73
/* Heap version of the data structure */
74
KeyValueType
*
heap
;
75
idxtype
*
locator
;
76
};
77
78
typedef
struct
PQueueType
PQueueType
;
79
80
81
/*************************************************************************
82
* The following data structure stores an edge
83
**************************************************************************/
84
struct
edegreedef
{
85
idxtype
pid
;
86
idxtype
ed
;
87
};
88
typedef
struct
edegreedef
EDegreeType
;
89
90
91
/*************************************************************************
92
* The following data structure stores an edge for vol
93
**************************************************************************/
94
struct
vedegreedef
{
95
idxtype
pid
;
96
idxtype
ed
,
ned
;
97
idxtype
gv
;
98
};
99
typedef
struct
vedegreedef
VEDegreeType
;
100
101
102
/*************************************************************************
103
* This data structure holds various working space data
104
**************************************************************************/
105
struct
workspacedef
{
106
idxtype
*
core
;
/* Where pairs, indices, and degrees are coming from */
107
int
maxcore
,
ccore
;
108
109
EDegreeType
*
edegrees
;
110
VEDegreeType
*
vedegrees
;
111
int
cdegree
;
112
113
idxtype
*
auxcore
;
/* This points to the memory of the edegrees */
114
115
idxtype
*
pmat
;
/* An array of k^2 used for eliminating domain
116
connectivity in k-way refinement */
117
};
118
119
typedef
struct
workspacedef
WorkSpaceType
;
120
121
122
/*************************************************************************
123
* The following data structure holds information on degrees for k-way
124
* partition
125
**************************************************************************/
126
struct
rinfodef
{
127
int
id
,
ed
;
/* ID/ED of nodes */
128
int
ndegrees
;
/* The number of different ext-degrees */
129
EDegreeType
*
edegrees
;
/* List of edges */
130
};
131
132
typedef
struct
rinfodef
RInfoType
;
133
134
135
/*************************************************************************
136
* The following data structure holds information on degrees for k-way
137
* vol-based partition
138
**************************************************************************/
139
struct
vrinfodef
{
140
int
id
,
ed
,
nid
;
/* ID/ED of nodes */
141
int
gv
;
/* IV/EV of nodes */
142
int
ndegrees
;
/* The number of different ext-degrees */
143
VEDegreeType
*
edegrees
;
/* List of edges */
144
};
145
146
typedef
struct
vrinfodef
VRInfoType
;
147
148
149
/*************************************************************************
150
* The following data structure holds information on degrees for k-way
151
* partition
152
**************************************************************************/
153
struct
nrinfodef
{
154
idxtype
edegrees
[2];
155
};
156
157
typedef
struct
nrinfodef
NRInfoType
;
158
159
160
/*************************************************************************
161
* This data structure holds the input graph
162
**************************************************************************/
163
struct
graphdef
{
164
idxtype
*
gdata
, *
rdata
;
/* Memory pools for graph and refinement data.
165
This is where memory is allocated and used
166
the rest of the fields in this structure */
167
168
int
nvtxs
,
nedges
;
/* The # of vertices and edges in the graph */
169
idxtype
*
xadj
;
/* Pointers to the locally stored vertices */
170
idxtype
*
vwgt
;
/* Vertex weights */
171
idxtype
*
vsize
;
/* Vertex sizes for min-volume formulation */
172
idxtype
*
adjncy
;
/* Array that stores the adjacency lists of nvtxs */
173
idxtype
*
adjwgt
;
/* Array that stores the weights of the adjacency lists */
174
175
idxtype
*
adjwgtsum
;
/* The sum of the adjacency weight of each vertex */
176
177
idxtype
*
label
;
178
179
idxtype
*
cmap
;
180
181
/* Partition parameters */
182
int
mincut
,
minvol
;
183
idxtype
*
where
, *
pwgts
;
184
int
nbnd
;
185
idxtype
*
bndptr
, *
bndind
;
186
187
/* Bisection refinement parameters */
188
idxtype
*
id
, *
ed
;
189
190
/* K-way refinement parameters */
191
RInfoType
*
rinfo
;
192
193
/* K-way volume refinement parameters */
194
VRInfoType
*
vrinfo
;
195
196
/* Node refinement information */
197
NRInfoType
*
nrinfo
;
198
199
200
/* Additional info needed by the MOC routines */
201
int
ncon
;
/* The # of constrains */
202
float
*
nvwgt
;
/* Normalized vertex weights */
203
float
*
npwgts
;
/* The normalized partition weights */
204
205
struct
graphdef
*
coarser
, *
finer
;
206
};
207
208
typedef
struct
graphdef
GraphType
;
209
210
211
212
/*************************************************************************
213
* The following data type implements a timer
214
**************************************************************************/
215
typedef
double
timer
;
216
217
218
/*************************************************************************
219
* The following structure stores information used by Metis
220
**************************************************************************/
221
struct
controldef
{
222
/* int cutType; */
/* cut type */
223
int
CoarsenTo
;
/* The # of vertices in the coarsest graph */
224
int
dbglvl
;
/* Controls the debuging output of the program */
225
int
CType
;
/* The type of coarsening */
226
int
IType
;
/* The type of initial partitioning */
227
int
RType
;
/* The type of refinement */
228
int
maxvwgt
;
/* The maximum allowed weight for a vertex */
229
float
nmaxvwgt
;
/* The maximum allowed weight for a vertex for each constrain */
230
int
optype
;
/* Type of operation */
231
int
pfactor
;
/* .1*prunning factor */
232
int
nseps
;
/* The number of separators to be found during multiple bisections */
233
int
oflags
;
234
235
WorkSpaceType
wspace
;
/* Work Space Informations */
236
237
/* Various Timers */
238
timer
TotalTmr
,
InitPartTmr
,
MatchTmr
,
ContractTmr
,
CoarsenTmr
,
UncoarsenTmr
,
239
SepTmr
,
RefTmr
,
ProjectTmr
,
SplitTmr
,
AuxTmr1
,
AuxTmr2
,
AuxTmr3
,
AuxTmr4
,
AuxTmr5
,
AuxTmr6
;
240
241
};
242
243
typedef
struct
controldef
CtrlType
;
244
245
246
/*************************************************************************
247
* The following data structure stores max-partition weight info for
248
* Vertical MOC k-way refinement
249
**************************************************************************/
250
struct
vpwgtdef
{
251
float
max
[2][
MAXNCON
];
252
int
imax
[2][
MAXNCON
];
253
};
254
255
typedef
struct
vpwgtdef
VPInfoType
;
256
257
258
259
MAXNCON
#define MAXNCON
Definition:
defs.h:25
ChainType
Definition:
struct.h:24
ChainType::point
int point
Definition:
struct.h:25
ChainType::from
int from
Definition:
struct.h:26
ChainType::change
float change
Definition:
struct.h:28
ChainType::to
int to
Definition:
struct.h:27
KeyValueType
Definition:
struct.h:37
KeyValueType::key
idxtype key
Definition:
struct.h:38
KeyValueType::val
idxtype val
Definition:
struct.h:39
ListNodeType
Definition:
struct.h:48
ListNodeType::id
int id
Definition:
struct.h:49
ListNodeType::next
struct ListNodeType * next
Definition:
struct.h:50
ListNodeType::prev
struct ListNodeType * prev
Definition:
struct.h:50
PQueueType
Definition:
struct.h:61
PQueueType::mustfree
int mustfree
Definition:
struct.h:65
PQueueType::locator
idxtype * locator
Definition:
struct.h:75
PQueueType::type
int type
Definition:
struct.h:62
PQueueType::pgainspan
int pgainspan
Definition:
struct.h:68
PQueueType::nodes
ListNodeType * nodes
Definition:
struct.h:70
PQueueType::buckets
ListNodeType ** buckets
Definition:
struct.h:71
PQueueType::maxnodes
int maxnodes
Definition:
struct.h:64
PQueueType::maxgain
int maxgain
Definition:
struct.h:69
PQueueType::heap
KeyValueType * heap
Definition:
struct.h:74
PQueueType::ngainspan
int ngainspan
Definition:
struct.h:68
PQueueType::nnodes
int nnodes
Definition:
struct.h:63
idxtype
int idxtype
Definition:
struct.h:17
timer
double timer
Definition:
struct.h:215
controldef
Definition:
struct.h:221
controldef::AuxTmr3
timer AuxTmr3
Definition:
struct.h:239
controldef::dbglvl
int dbglvl
Definition:
struct.h:224
controldef::ContractTmr
timer ContractTmr
Definition:
struct.h:238
controldef::wspace
WorkSpaceType wspace
Definition:
struct.h:235
controldef::ProjectTmr
timer ProjectTmr
Definition:
struct.h:239
controldef::AuxTmr2
timer AuxTmr2
Definition:
struct.h:239
controldef::pfactor
int pfactor
Definition:
struct.h:231
controldef::RefTmr
timer RefTmr
Definition:
struct.h:239
controldef::CoarsenTmr
timer CoarsenTmr
Definition:
struct.h:238
controldef::AuxTmr6
timer AuxTmr6
Definition:
struct.h:239
controldef::CType
int CType
Definition:
struct.h:225
controldef::UncoarsenTmr
timer UncoarsenTmr
Definition:
struct.h:238
controldef::InitPartTmr
timer InitPartTmr
Definition:
struct.h:238
controldef::optype
int optype
Definition:
struct.h:230
controldef::IType
int IType
Definition:
struct.h:226
controldef::nseps
int nseps
Definition:
struct.h:232
controldef::maxvwgt
int maxvwgt
Definition:
struct.h:228
controldef::CoarsenTo
int CoarsenTo
Definition:
struct.h:223
controldef::RType
int RType
Definition:
struct.h:227
controldef::SepTmr
timer SepTmr
Definition:
struct.h:239
controldef::MatchTmr
timer MatchTmr
Definition:
struct.h:238
controldef::AuxTmr1
timer AuxTmr1
Definition:
struct.h:239
controldef::nmaxvwgt
float nmaxvwgt
Definition:
struct.h:229
controldef::oflags
int oflags
Definition:
struct.h:233
controldef::AuxTmr4
timer AuxTmr4
Definition:
struct.h:239
controldef::AuxTmr5
timer AuxTmr5
Definition:
struct.h:239
controldef::TotalTmr
timer TotalTmr
Definition:
struct.h:238
controldef::SplitTmr
timer SplitTmr
Definition:
struct.h:239
edegreedef
Definition:
struct.h:84
edegreedef::pid
idxtype pid
Definition:
struct.h:85
edegreedef::ed
idxtype ed
Definition:
struct.h:86
graphdef
Definition:
struct.h:163
graphdef::nbnd
int nbnd
Definition:
struct.h:184
graphdef::adjncy
idxtype * adjncy
Definition:
struct.h:172
graphdef::vrinfo
VRInfoType * vrinfo
Definition:
struct.h:194
graphdef::bndind
idxtype * bndind
Definition:
struct.h:185
graphdef::where
idxtype * where
Definition:
struct.h:183
graphdef::rdata
idxtype * rdata
Definition:
struct.h:164
graphdef::nvtxs
int nvtxs
Definition:
struct.h:168
graphdef::gdata
idxtype * gdata
Definition:
struct.h:164
graphdef::ed
idxtype * ed
Definition:
struct.h:188
graphdef::vwgt
idxtype * vwgt
Definition:
struct.h:170
graphdef::nvwgt
float * nvwgt
Definition:
struct.h:202
graphdef::minvol
int minvol
Definition:
struct.h:182
graphdef::nrinfo
NRInfoType * nrinfo
Definition:
struct.h:197
graphdef::adjwgtsum
idxtype * adjwgtsum
Definition:
struct.h:175
graphdef::finer
struct graphdef * finer
Definition:
struct.h:205
graphdef::rinfo
RInfoType * rinfo
Definition:
struct.h:191
graphdef::pwgts
idxtype * pwgts
Definition:
struct.h:183
graphdef::label
idxtype * label
Definition:
struct.h:177
graphdef::ncon
int ncon
Definition:
struct.h:201
graphdef::id
idxtype * id
Definition:
struct.h:188
graphdef::npwgts
float * npwgts
Definition:
struct.h:203
graphdef::nedges
int nedges
Definition:
struct.h:168
graphdef::mincut
int mincut
Definition:
struct.h:182
graphdef::adjwgt
idxtype * adjwgt
Definition:
struct.h:173
graphdef::bndptr
idxtype * bndptr
Definition:
struct.h:185
graphdef::vsize
idxtype * vsize
Definition:
struct.h:171
graphdef::coarser
struct graphdef * coarser
Definition:
struct.h:205
graphdef::xadj
idxtype * xadj
Definition:
struct.h:169
graphdef::cmap
idxtype * cmap
Definition:
struct.h:179
nrinfodef
Definition:
struct.h:153
nrinfodef::edegrees
idxtype edegrees[2]
Definition:
struct.h:154
rinfodef
Definition:
struct.h:126
rinfodef::id
int id
Definition:
struct.h:127
rinfodef::ndegrees
int ndegrees
Definition:
struct.h:128
rinfodef::edegrees
EDegreeType * edegrees
Definition:
struct.h:129
rinfodef::ed
int ed
Definition:
struct.h:127
vedegreedef
Definition:
struct.h:94
vedegreedef::ed
idxtype ed
Definition:
struct.h:96
vedegreedef::ned
idxtype ned
Definition:
struct.h:96
vedegreedef::pid
idxtype pid
Definition:
struct.h:95
vedegreedef::gv
idxtype gv
Definition:
struct.h:97
vpwgtdef
Definition:
struct.h:250
vpwgtdef::imax
int imax[2][MAXNCON]
Definition:
struct.h:252
vpwgtdef::max
float max[2][MAXNCON]
Definition:
struct.h:251
vrinfodef
Definition:
struct.h:139
vrinfodef::gv
int gv
Definition:
struct.h:141
vrinfodef::id
int id
Definition:
struct.h:140
vrinfodef::ndegrees
int ndegrees
Definition:
struct.h:142
vrinfodef::edegrees
VEDegreeType * edegrees
Definition:
struct.h:143
vrinfodef::nid
int nid
Definition:
struct.h:140
vrinfodef::ed
int ed
Definition:
struct.h:140
workspacedef
Definition:
struct.h:105
workspacedef::core
idxtype * core
Definition:
struct.h:106
workspacedef::ccore
int ccore
Definition:
struct.h:107
workspacedef::edegrees
EDegreeType * edegrees
Definition:
struct.h:109
workspacedef::maxcore
int maxcore
Definition:
struct.h:107
workspacedef::auxcore
idxtype * auxcore
Definition:
struct.h:113
workspacedef::cdegree
int cdegree
Definition:
struct.h:111
workspacedef::vedegrees
VEDegreeType * vedegrees
Definition:
struct.h:110
workspacedef::pmat
idxtype * pmat
Definition:
struct.h:115
libs
Reconstruction
lib
Graclus
metisLib
struct.h
Generated on Wed Jan 28 2026 09:00:59 for ACloudViewer by
1.9.1