forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathquality.html
483 lines (447 loc) · 14.3 KB
/
quality.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<html>
<head>
<title>
QUALITY - Quality Measures for Pointsets in M dimensions
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
QUALITY <br> Quality Measures for Pointsets in M dimensions
</h1>
<hr>
<p>
<b>QUALITY</b>
is a C++ library which
computes some measures of the quality
of dispersion of a set of N points in the unit hypercube in M
dimensional space.
</p>
<p>
The region to be analyzed is defined by a single routine which
the user may specify. We will refer to that routine as
<b>sample_routine</b>. This routine is simply required to return
sample points from the region.
</p>
<p>
The library includes routines for two simple regions, namely
the unit hypercube and the unit hypersphere. If either of these
regions is of interest, then the user simply has to pass the
appropriate name, either <b>sample_hypercube_uniform</b> or
<b>sample_sphere_uniform</b>. For other regions, the user should
write the appropriate version of a sampling routine.
</p>
<p>
The unit hypercube in M dimensional space is simply the set of
all vectors whose entries are between 0 and 1. It is
a natural abstraction of the unit line segment, the unit square,
and the unit cube, and represents a very simple chunk of <b>M</b>
dimensional space.
</p>
<p>
The unit hypersphere in M dimensional space is simply the set of
all points whose distance from the origin is 1 or less.
</p>
<p>
The quality measures computed include:
<ul>
<li>
<b>Alpha</b>, the minimum angle divided by the maximum possible
minimum angle (for triangulated 2D datasets only);
</li>
<li>
<b>Area</b>, the ratio of the minimum and maximum triangle
areas (for triangulated 2D datasets only);
</li>
<li>
<b>Beta</b>, the standard deviation of the minimum spacing
between nodes, normalized by the average spacing between nodes;
</li>
<li>
<b>Chi</b>, the regularity measure;
</li>
<li>
<b>D</b>, the second moment determinant measure;
</li>
<li>
<b>E</b>, the Voronoi energy measure;
</li>
<li>
<b>Gamma</b>, the mesh ratio;
</li>
<li>
<b>H</b>, the point distribution norm;
</li>
<li>
<b>Lambda</b>, the COV measure;
</li>
<li>
<b>Mu</b>, the point distribution ratio;
</li>
<li>
<b>Nu</b>, the cell volume deviation;
</li>
<li>
<b>Q</b>, two times the radius of the inscribed circle
divided by the radius of the circumscribed circle
(for triangulated 2D datasets only);
</li>
<li>
<b>R0</b>, the Riesz S=0 energy;
</li>
<li>
<b>S</b>, the sphere volume measure
(unit hypercube datasets only).
</li>
<li>
<b>Tau</b>, the second moment trace measure;
</li>
</ul>
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>QUALITY</b> is available in
<a href = "../../cpp_src/quality/quality.html">a C++ version</a> and
<a href = "../../f_src/quality/quality.html">a FORTRAN90 version</a> and
<a href = "../../m_src/quality/quality.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Programs:
</h3>
<p>
<a href = "../../f_src/diaphony/diaphony.html">
DIAPHONY</a>,
a FORTRAN90 program which
reads a file of N points in M dimensions and computes its diaphony, a measure
of point dispersion.
</p>
<p>
<a href = "../../cpp_src/star_discrepancy/star_discrepancy.html">
STAR_DISCREPANCY</a>,
a C++ program which
reads a TABLE file of N points in M dimensions (presumed to lie in the
unit hypercube) and computes bounds on the star discrepancy,
a measure of dispersion, by Eric Thiemard.
</p>
<p>
<a href = "../../cpp_src/table_quality/table_quality.html">
TABLE_QUALITY</a>,
a C++ program which
analyzes the point spacing quality of data stored in a file.
</p>
<p>
<a href = "../../cpp_src/tet_mesh/tet_mesh.html">
TET_MESH</a>,
a C++ library which
includes some quality measures for tetrahedral meshes.
</p>
<p>
<a href = "../../cpp_src/tet_mesh_quality/tet_mesh_quality.html">
TET_MESH_QUALITY</a>,
a C++ program which
computes quality measures of a tetrahedral mesh.
</p>
<p>
<a href = "../../cpp_src/triangulation_quality/triangulation_quality.html">
TRIANGULATION_QUALITY</a>,
a C++ program which
computes quality measures of a triangulation.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
David Field,<br>
Qualitative Measures for Initial Meshes,<br>
International Journal of Numerical Methods in Engineering,<br>
Volume 47, 2000, pages 887-906.
</li>
<li>
DP Hardin, Edward Saff,<br>
Discretizing Manifolds via Minimum Energy Points,<br>
Notices of the AMS,<br>
Volume 51, Number 10, November 2004, pages 1186-1194.
</li>
<li>
Per-Olof Persson, Gilbert Strang,<br>
A Simple Mesh Generator in MATLAB,<br>
SIAM Review,<br>
Volume 46, Number 2, pages 329-345, June 2004.
</li>
<li>
Yuki Saka, Max Gunzburger, John Burkardt,<br>
Latinized, Improved LHS, and CVT Point Sets in Hypercubes, <br>
International Journal of Numerical Analysis and Modeling,<br>
Volume 4, Number 3-4, 2007, pages 729-743,
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "quality.cpp">quality.cpp</a>, the source code.
</li>
<li>
<a href = "quality.hpp">quality.hpp</a>, the include file.
</li>
<li>
<a href = "quality.sh">quality.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "quality_prb.cpp">quality_prb.cpp</a>, the test code.
</li>
<li>
<a href = "quality_prb.sh">quality_prb.sh</a>,
commands to compile, link, load and run the test code.
</li>
<li>
<a href = "cvt_02_00100.txt">cvt_02_00100.txt</a>,
a set of 100 CVT points in the 2D unit hypercube.
</li>
<li>
<a href = "quality_prb_output.txt">quality_prb_output.txt</a>,
the output file.
</li>
<li>
<a href = "halton_02_00100.txt">halton_02_00100.txt</a>,
a set of 100 Halton points in the 2D unit hypercube.
</li>
<li>
<a href = "sphere_02_00100.txt">sphere_02_00100.txt</a>,
a set of 100 points in the 2D unit sphere.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>ALPHA_MEASURE</b> determines the triangulated pointset quality measure ALPHA.
</li>
<li>
<b>ARC_COSINE</b> computes the arc cosine function, with argument truncation.
</li>
<li>
<b>AREA_MEASURE</b> determines the area ratio quality measure.
</li>
<li>
<b>BETA_MEASURE</b> determines the pointset quality measure BETA.
</li>
<li>
<b>CH_CAP</b> capitalizes a single character.
</li>
<li>
<b>CH_EQI</b> is true if two characters are equal, disregarding case.
</li>
<li>
<b>CH_TO_DIGIT</b> returns the integer value of a base 10 digit.
</li>
<li>
<b>CHI_MEASURE</b> determines the pointset quality measure CHI.
</li>
<li>
<b>D_MEASURE</b> determines the pointset quality measure D.
</li>
<li>
<b>DGE_DET</b> computes the determinant of a square matrix in DGE storage.
</li>
<li>
<b>DIAEDG</b> chooses a diagonal edge.
</li>
<li>
<b>DTABLE_DATA_READ</b> reads the data from a real TABLE file.
</li>
<li>
<b>DTABLE_HEADER_READ</b> reads the header from a real TABLE file.
</li>
<li>
<b>DTRIS2</b> constructs a Delaunay triangulation of 2D vertices.
</li>
<li>
<b>E_MEASURE</b> determines the pointset quality measure E.
</li>
<li>
<b>FILE_COLUMN_COUNT</b> counts the number of columns in the first line of a file.
</li>
<li>
<b>FILE_ROW_COUNT</b> counts the number of row records in a file.
</li>
<li>
<b>FIND_CLOSEST</b> finds the nearest R point to each S point.
</li>
<li>
<b>GAMMA_MEASURE</b> determines the pointset quality measure GAMMA.
</li>
<li>
<b>H_MEASURE</b> determines the pointset quality measure H.
</li>
<li>
<b>I4_MAX</b> returns the maximum of two integers.
</li>
<li>
<b>I4_MIN</b> returns the smaller of two integers.
</li>
<li>
<b>I4_MODP</b> returns the nonnegative remainder of integer division.
</li>
<li>
<b>I4_SIGN</b> returns the sign of an integer.
</li>
<li>
<b>I4_WRAP</b> forces an integer to lie between given limits by wrapping.
</li>
<li>
<b>I4VEC_INDICATOR</b> sets an integer vector to the indicator vector.
</li>
<li>
<b>I4VEC_PRINT</b> prints an integer vector.
</li>
<li>
<b>LAMBDA_MEASURE</b> determines the pointset quality measure LAMBDA.
</li>
<li>
<b>LRLINE</b> determines where a point lies in relation to a directed line.
</li>
<li>
<b>MU_MEASURE</b> determines the pointset quality measure MU.
</li>
<li>
<b>NU_MEASURE</b> determines the pointset quality measure NU.
</li>
<li>
<b>PERM_INV</b> inverts a permutation "in place".
</li>
<li>
<b>POINTSET_SPACING</b> determines the minimum spacing between points in the set.
</li>
<li>
<b>Q_MEASURE</b> determines the triangulated pointset quality measure Q.
</li>
<li>
<b>R0_MEASURE</b> determines the pointset quality measure R0.
</li>
<li>
<b>R8_EPSILON</b> returns the round off unit for double precision arithmetic.
</li>
<li>
<b>R8_HUGE</b> returns a "huge" double precision value.
</li>
<li>
<b>R8_MAX</b> returns the maximum of two double precision values.
</li>
<li>
<b>R8_MIN</b> returns the minimum of two double precision values.
</li>
<li>
<b>R8_UNIFORM_01</b> is a portable pseudorandom number generator.
</li>
<li>
<b>R82VEC_PERMUTE</b> permutes an R2 vector in place.
</li>
<li>
<b>R82VEC_SORT_HEAP_INDEX_A</b> does an indexed heap ascending sort of an R2 vector.
</li>
<li>
<b>R8MAT_IN_01</b> is TRUE if the entries of an array are in the range [0,1].
</li>
<li>
<b>R8MAT_TRANSPOSE_PRINT</b> prints a real matrix, transposed.
</li>
<li>
<b>R8MAT_TRANSPOSE_PRINT_SOME</b> prints some of a real matrix, transposed.
</li>
<li>
<b>R8MAT_UNIFORM_01</b> fills a double precision array with pseudorandom values.
</li>
<li>
<b>R8VEC_MAX</b> returns the value of the maximum element in a double precision array.
</li>
<li>
<b>R8VEC_MIN</b> returns the value of the minimum element in a double precision array.
</li>
<li>
<b>R8VEC_NORMAL_01</b> samples the standard normal probability distribution.
</li>
<li>
<b>R8VEC_UNIFORM_01</b> fills a double precision vector with pseudorandom values.
</li>
<li>
<b>RADIUS_MAXIMUS</b> finds the biggest possible nonintersecting sphere.
</li>
<li>
<b>S_LEN_TRIM</b> returns the length of a string to the last nonblank.
</li>
<li>
<b>S_TO_R8</b> reads an R8 from a string.
</li>
<li>
<b>S_TO_R8VEC</b> reads an R8VEC from a string.
</li>
<li>
<b>S_WORD_COUNT</b> counts the number of "words" in a string.
</li>
<li>
<b>SAMPLE_HYPERCUBE_UNIFORM</b> returns sample points in the unit hypercube.
</li>
<li>
<b>SAMPLE_SPHERE_UNIFORM</b> samples points inside the unit sphere.
</li>
<li>
<b>SPHERE_MEASURE</b> determines the pointset quality measure S.
</li>
<li>
<b>SPHERE_VOLUME_ND</b> computes the volume of a sphere in ND.
</li>
<li>
<b>SWAPEC</b> swaps diagonal edges until all triangles are Delaunay.
</li>
<li>
<b>TAU_MEASURE</b> determines the pointset quality measure TAU.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
<li>
<b>TIMESTRING</b> returns the current YMDHMS date as a string.
</li>
<li>
<b>VBEDG</b> determines which boundary edges are visible to a point.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 06 November 2008.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>