user_r.c
Go to the documentation of this file.
1 /*<html><pre> -<a href="qh-user_r.htm"
2  >-------------------------------</a><a name="TOP">-</a>
3 
4  user.c
5  user redefinable functions
6 
7  see user2_r.c for qh_fprintf, qh_malloc, qh_free
8 
9  see README.txt see COPYING.txt for copyright information.
10 
11  see libqhull_r.h for data structures, macros, and user-callable functions.
12 
13  see user_eg.c, user_eg2.c, and unix.c for examples.
14 
15  see user.h for user-definable constants
16 
17  use qh_NOmem in mem_r.h to turn off memory management
18  use qh_NOmerge in user.h to turn off facet merging
19  set qh_KEEPstatistics in user.h to 0 to turn off statistics
20 
21  This is unsupported software. You're welcome to make changes,
22  but you're on your own if something goes wrong. Use 'Tc' to
23  check frequently. Usually qhull will report an error if
24  a data structure becomes inconsistent. If so, it also reports
25  the last point added to the hull, e.g., 102. You can then trace
26  the execution of qhull with "T4P102".
27 
28  Please report any errors that you fix to qhull@qhull.org
29 
30  Qhull-template is a template for calling qhull from within your application
31 
32  if you recompile and load this module, then user.o will not be loaded
33  from qhull.a
34 
35  you can add additional quick allocation sizes in qh_user_memsizes
36 
37  if the other functions here are redefined to not use qh_print...,
38  then io.o will not be loaded from qhull.a. See user_eg_r.c for an
39  example. We recommend keeping io.o for the extra debugging
40  information it supplies.
41 */
42 
43 #include "qhull_ra.h"
44 
45 #include <stdarg.h>
46 
47 /*-<a href="qh-user_r.htm#TOC"
48  >-------------------------------</a><a name="qhull_template">-</a>
49 
50  Qhull-template
51  Template for calling qhull from inside your program
52 
53  returns:
54  exit code(see qh_ERR... in libqhull_r.h)
55  all memory freed
56 
57  notes:
58  This can be called any number of times.
59 
60 */
61 #if 0
62 {
63  int dim; /* dimension of points */
64  int numpoints; /* number of points */
65  coordT *points; /* array of coordinates for each point */
66  boolT ismalloc; /* True if qhull should free points in qh_freeqhull() or reallocation */
67  char flags[]= "qhull Tv"; /* option flags for qhull, see qh_opt.htm */
68  FILE *outfile= stdout; /* output from qh_produce_output(qh)
69  use NULL to skip qh_produce_output(qh) */
70  FILE *errfile= stderr; /* error messages from qhull code */
71  int exitcode; /* 0 if no error from qhull */
72  facetT *facet; /* set by FORALLfacets */
73  int curlong, totlong; /* memory remaining after qh_memfreeshort */
74 
75  qhT qh_qh; /* Qhull's data structure. First argument of most calls */
76  qhT *qh= &qh_qh; /* Alternatively -- qhT *qh= (qhT*)malloc(sizeof(qhT)) */
77 
78  QHULL_LIB_CHECK /* Check for compatible library */
79 
80  qh_zero(qh, errfile);
81 
82  /* initialize dim, numpoints, points[], ismalloc here */
83  exitcode= qh_new_qhull(qh, dim, numpoints, points, ismalloc,
84  flags, outfile, errfile);
85  if (!exitcode) { /* if no error */
86  /* 'qh->facet_list' contains the convex hull */
87  FORALLfacets {
88  /* ... your code ... */
89  }
90  }
92  qh_memfreeshort(qh, &curlong, &totlong);
93  if (curlong || totlong)
94  qh_fprintf(qh, errfile, 7068, "qhull internal warning (main): did not free %d bytes of long memory(%d pieces)\n", totlong, curlong);
95 }
96 #endif
97 
98 /*-<a href="qh-user_r.htm#TOC"
99  >-------------------------------</a><a name="new_qhull">-</a>
100 
101  qh_new_qhull(qh, dim, numpoints, points, ismalloc, qhull_cmd, outfile, errfile )
102  Run qhull and return results in qh.
103  Returns exitcode (0 if no errors).
104  Before first call, either call qh_zero(qh, errfile), or set qh to all zero.
105 
106  notes:
107  do not modify points until finished with results.
108  The qhull data structure contains pointers into the points array.
109  do not call qhull functions before qh_new_qhull().
110  The qhull data structure is not initialized until qh_new_qhull().
111  do not call qh_init_A (global_r.c)
112 
113  Default errfile is stderr, outfile may be null
114  qhull_cmd must start with "qhull "
115  projects points to a new point array for Delaunay triangulations ('d' and 'v')
116  transforms points into a new point array for halfspace intersection ('H')
117 
118  see:
119  Qhull-template at the beginning of this file.
120  An example of using qh_new_qhull is user_eg_r.c
121 */
122 int qh_new_qhull(qhT *qh, int dim, int numpoints, coordT *points, boolT ismalloc,
123  char *qhull_cmd, FILE *outfile, FILE *errfile) {
124  int exitcode, hulldim;
125  boolT new_ismalloc;
126  coordT *new_points;
127 
128  if(!errfile){
129  errfile= stderr;
130  }
131  if (!qh->qhmem.ferr) {
132  qh_meminit(qh, errfile);
133  } else {
134  qh_memcheck(qh);
135  }
136  if (strncmp(qhull_cmd, "qhull ", (size_t)6)) {
137  qh_fprintf(qh, errfile, 6186, "qhull error (qh_new_qhull): start qhull_cmd argument with \"qhull \"\n");
138  return qh_ERRinput;
139  }
140  qh_initqhull_start(qh, NULL, outfile, errfile);
141  trace1((qh, qh->ferr, 1044, "qh_new_qhull: build new Qhull for %d %d-d points with %s\n", numpoints, dim, qhull_cmd));
142  exitcode = setjmp(qh->errexit);
143  if (!exitcode)
144  {
145  qh->NOerrexit = False;
146  qh_initflags(qh, qhull_cmd);
147  if (qh->DELAUNAY)
148  qh->PROJECTdelaunay= True;
149  if (qh->HALFspace) {
150  /* points is an array of halfspaces,
151  the last coordinate of each halfspace is its offset */
152  hulldim= dim-1;
153  qh_setfeasible(qh, hulldim);
154  new_points= qh_sethalfspace_all(qh, dim, numpoints, points, qh->feasible_point);
155  new_ismalloc= True;
156  if (ismalloc)
157  qh_free(points);
158  }else {
159  hulldim= dim;
160  new_points= points;
161  new_ismalloc= ismalloc;
162  }
163  qh_init_B(qh, new_points, numpoints, hulldim, new_ismalloc);
164  qh_qhull(qh);
166  if (outfile) {
168  }else {
170  }
171  if (qh->VERIFYoutput && !qh->STOPpoint && !qh->STOPcone)
173  }
174  qh->NOerrexit = True;
175  return exitcode;
176 } /* new_qhull */
177 
178 /*-<a href="qh-user_r.htm#TOC"
179  >-------------------------------</a><a name="errexit">-</a>
180 
181  qh_errexit(qh, exitcode, facet, ridge )
182  report and exit from an error
183  report facet and ridge if non-NULL
184  reports useful information such as last point processed
185  set qh.FORCEoutput to print neighborhood of facet
186 
187  see:
188  qh_errexit2() in libqhull_r.c for printing 2 facets
189 
190  design:
191  check for error within error processing
192  compute qh.hulltime
193  print facet and ridge (if any)
194  report commandString, options, qh.furthest_id
195  print summary and statistics (including precision statistics)
196  if qh_ERRsingular
197  print help text for singular data set
198  exit program via long jump (if defined) or exit()
199 */
200 void qh_errexit(qhT *qh, int exitcode, facetT *facet, ridgeT *ridge) {
201 
202  if (qh->ERREXITcalled) {
203  qh_fprintf(qh, qh->ferr, 8126, "\nqhull error while processing previous error. Exit program\n");
205  }
206  qh->ERREXITcalled= True;
207  if (!qh->QHULLfinished)
208  qh->hulltime= qh_CPUclock - qh->hulltime;
209  qh_errprint(qh, "ERRONEOUS", facet, NULL, ridge, NULL);
210  qh_fprintf(qh, qh->ferr, 8127, "\nWhile executing: %s | %s\n", qh->rbox_command, qh->qhull_command);
211  qh_fprintf(qh, qh->ferr, 8128, "Options selected for Qhull %s:\n%s\n", qh_version, qh->qhull_options);
212  if (qh->furthest_id >= 0) {
213  qh_fprintf(qh, qh->ferr, 8129, "Last point added to hull was p%d.", qh->furthest_id);
214  if (zzval_(Ztotmerge))
215  qh_fprintf(qh, qh->ferr, 8130, " Last merge was #%d.", zzval_(Ztotmerge));
216  if (qh->QHULLfinished)
217  qh_fprintf(qh, qh->ferr, 8131, "\nQhull has finished constructing the hull.");
218  else if (qh->POSTmerging)
219  qh_fprintf(qh, qh->ferr, 8132, "\nQhull has started post-merging.");
220  qh_fprintf(qh, qh->ferr, 8133, "\n");
221  }
222  if (qh->FORCEoutput && (qh->QHULLfinished || (!facet && !ridge)))
224  else if (exitcode != qh_ERRinput) {
225  if (exitcode != qh_ERRsingular && zzval_(Zsetplane) > qh->hull_dim+1) {
226  qh_fprintf(qh, qh->ferr, 8134, "\nAt error exit:\n");
227  qh_printsummary(qh, qh->ferr);
228  if (qh->PRINTstatistics) {
230  qh_printstatistics(qh, qh->ferr, "at error exit");
231  qh_memstatistics(qh, qh->ferr);
232  }
233  }
234  if (qh->PRINTprecision)
235  qh_printstats(qh, qh->ferr, qh->qhstat.precision, NULL);
236  }
237  if (!exitcode)
238  exitcode= qh_ERRqhull;
239  else if (exitcode == qh_ERRsingular)
240  qh_printhelp_singular(qh, qh->ferr);
241  else if (exitcode == qh_ERRprec && !qh->PREmerge)
242  qh_printhelp_degenerate(qh, qh->ferr);
243  if (qh->NOerrexit) {
244  qh_fprintf(qh, qh->ferr, 6187, "qhull error while ending program, or qh->NOerrexit not cleared after setjmp(). Exit program with error.\n");
246  }
247  qh->ERREXITcalled= False;
248  qh->NOerrexit= True;
249  qh->ALLOWrestart= False; /* longjmp will undo qh_build_withrestart */
250  longjmp(qh->errexit, exitcode);
251 } /* errexit */
252 
253 
254 /*-<a href="qh-user_r.htm#TOC"
255  >-------------------------------</a><a name="errprint">-</a>
256 
257  qh_errprint(qh, fp, string, atfacet, otherfacet, atridge, atvertex )
258  prints out the information of facets and ridges to fp
259  also prints neighbors and geomview output
260 
261  notes:
262  except for string, any parameter may be NULL
263 */
264 void qh_errprint(qhT *qh, const char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex) {
265  int i;
266 
267  if (atfacet) {
268  qh_fprintf(qh, qh->ferr, 8135, "%s FACET:\n", string);
269  qh_printfacet(qh, qh->ferr, atfacet);
270  }
271  if (otherfacet) {
272  qh_fprintf(qh, qh->ferr, 8136, "%s OTHER FACET:\n", string);
273  qh_printfacet(qh, qh->ferr, otherfacet);
274  }
275  if (atridge) {
276  qh_fprintf(qh, qh->ferr, 8137, "%s RIDGE:\n", string);
277  qh_printridge(qh, qh->ferr, atridge);
278  if (atridge->top && atridge->top != atfacet && atridge->top != otherfacet)
279  qh_printfacet(qh, qh->ferr, atridge->top);
280  if (atridge->bottom
281  && atridge->bottom != atfacet && atridge->bottom != otherfacet)
282  qh_printfacet(qh, qh->ferr, atridge->bottom);
283  if (!atfacet)
284  atfacet= atridge->top;
285  if (!otherfacet)
286  otherfacet= otherfacet_(atridge, atfacet);
287  }
288  if (atvertex) {
289  qh_fprintf(qh, qh->ferr, 8138, "%s VERTEX:\n", string);
290  qh_printvertex(qh, qh->ferr, atvertex);
291  }
292  if (qh->fout && qh->FORCEoutput && atfacet && !qh->QHULLfinished && !qh->IStracing) {
293  qh_fprintf(qh, qh->ferr, 8139, "ERRONEOUS and NEIGHBORING FACETS to output\n");
294  for (i=0; i < qh_PRINTEND; i++) /* use fout for geomview output */
295  qh_printneighborhood(qh, qh->fout, qh->PRINTout[i], atfacet, otherfacet,
296  !qh_ALL);
297  }
298 } /* errprint */
299 
300 
301 /*-<a href="qh-user_r.htm#TOC"
302  >-------------------------------</a><a name="printfacetlist">-</a>
303 
304  qh_printfacetlist(qh, fp, facetlist, facets, printall )
305  print all fields for a facet list and/or set of facets to fp
306  if !printall,
307  only prints good facets
308 
309  notes:
310  also prints all vertices
311 */
312 void qh_printfacetlist(qhT *qh, facetT *facetlist, setT *facets, boolT printall) {
313  facetT *facet, **facetp;
314 
315  qh_printbegin(qh, qh->ferr, qh_PRINTfacets, facetlist, facets, printall);
316  FORALLfacet_(facetlist)
317  qh_printafacet(qh, qh->ferr, qh_PRINTfacets, facet, printall);
318  FOREACHfacet_(facets)
319  qh_printafacet(qh, qh->ferr, qh_PRINTfacets, facet, printall);
320  qh_printend(qh, qh->ferr, qh_PRINTfacets, facetlist, facets, printall);
321 } /* printfacetlist */
322 
323 
324 /*-<a href="qh-io_r.htm#TOC"
325  >-------------------------------</a><a name="printhelp_degenerate">-</a>
326 
327  qh_printhelp_degenerate(qh, fp )
328  prints descriptive message for precision error
329 
330  notes:
331  no message if qh_QUICKhelp
332 */
333 void qh_printhelp_degenerate(qhT *qh, FILE *fp) {
334 
335  if (qh->MERGEexact || qh->PREmerge || qh->JOGGLEmax < REALmax/2)
336  qh_fprintf(qh, fp, 9368, "\n\
337 A Qhull error has occurred. Qhull should have corrected the above\n\
338 precision error. Please send the input and all of the output to\n\
339 qhull_bug@qhull.org\n");
340  else if (!qh_QUICKhelp) {
341  qh_fprintf(qh, fp, 9369, "\n\
342 Precision problems were detected during construction of the convex hull.\n\
343 This occurs because convex hull algorithms assume that calculations are\n\
344 exact, but floating-point arithmetic has roundoff errors.\n\
345 \n\
346 To correct for precision problems, do not use 'Q0'. By default, Qhull\n\
347 selects 'C-0' or 'Qx' and merges non-convex facets. With option 'QJ',\n\
348 Qhull joggles the input to prevent precision problems. See \"Imprecision\n\
349 in Qhull\" (qh-impre.htm).\n\
350 \n\
351 If you use 'Q0', the output may include\n\
352 coplanar ridges, concave ridges, and flipped facets. In 4-d and higher,\n\
353 Qhull may produce a ridge with four neighbors or two facets with the same \n\
354 vertices. Qhull reports these events when they occur. It stops when a\n\
355 concave ridge, flipped facet, or duplicate facet occurs.\n");
356 #if REALfloat
357  qh_fprintf(qh, fp, 9370, "\
358 \n\
359 Qhull is currently using single precision arithmetic. The following\n\
360 will probably remove the precision problems:\n\
361  - recompile qhull for realT precision(#define REALfloat 0 in user.h).\n");
362 #endif
363  if (qh->DELAUNAY && !qh->SCALElast && qh->MAXabs_coord > 1e4)
364  qh_fprintf(qh, fp, 9371, "\
365 \n\
366 When computing the Delaunay triangulation of coordinates > 1.0,\n\
367  - use 'Qbb' to scale the last coordinate to [0,m] (max previous coordinate)\n");
368  if (qh->DELAUNAY && !qh->ATinfinity)
369  qh_fprintf(qh, fp, 9372, "\
370 When computing the Delaunay triangulation:\n\
371  - use 'Qz' to add a point at-infinity. This reduces precision problems.\n");
372 
373  qh_fprintf(qh, fp, 9373, "\
374 \n\
375 If you need triangular output:\n\
376  - use option 'Qt' to triangulate the output\n\
377  - use option 'QJ' to joggle the input points and remove precision errors\n\
378  - use option 'Ft'. It triangulates non-simplicial facets with added points.\n\
379 \n\
380 If you must use 'Q0',\n\
381 try one or more of the following options. They can not guarantee an output.\n\
382  - use 'QbB' to scale the input to a cube.\n\
383  - use 'Po' to produce output and prevent partitioning for flipped facets\n\
384  - use 'V0' to set min. distance to visible facet as 0 instead of roundoff\n\
385  - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
386  - options 'Qf', 'Qbb', and 'QR0' may also help\n",
387  qh->DISTround);
388  qh_fprintf(qh, fp, 9374, "\
389 \n\
390 To guarantee simplicial output:\n\
391  - use option 'Qt' to triangulate the output\n\
392  - use option 'QJ' to joggle the input points and remove precision errors\n\
393  - use option 'Ft' to triangulate the output by adding points\n\
394  - use exact arithmetic (see \"Imprecision in Qhull\", qh-impre.htm)\n\
395 ");
396  }
397 } /* printhelp_degenerate */
398 
399 
400 /*-<a href="qh-globa_r.htm#TOC"
401  >-------------------------------</a><a name="printhelp_narrowhull">-</a>
402 
403  qh_printhelp_narrowhull(qh, minangle )
404  Warn about a narrow hull
405 
406  notes:
407  Alternatively, reduce qh_WARNnarrow in user.h
408 
409 */
410 void qh_printhelp_narrowhull(qhT *qh, FILE *fp, realT minangle) {
411 
412  qh_fprintf(qh, fp, 9375, "qhull precision warning: \n\
413 The initial hull is narrow (cosine of min. angle is %.16f).\n\
414 Is the input lower dimensional (e.g., on a plane in 3-d)? Qhull may\n\
415 produce a wide facet. Options 'QbB' (scale to unit box) or 'Qbb' (scale\n\
416 last coordinate) may remove this warning. Use 'Pp' to skip this warning.\n\
417 See 'Limitations' in qh-impre.htm.\n",
418  -minangle); /* convert from angle between normals to angle between facets */
419 } /* printhelp_narrowhull */
420 
421 /*-<a href="qh-io_r.htm#TOC"
422  >-------------------------------</a><a name="printhelp_singular">-</a>
423 
424  qh_printhelp_singular(qh, fp )
425  prints descriptive message for singular input
426 */
427 void qh_printhelp_singular(qhT *qh, FILE *fp) {
428  facetT *facet;
429  vertexT *vertex, **vertexp;
430  realT min, max, *coord, dist;
431  int i,k;
432 
433  qh_fprintf(qh, fp, 9376, "\n\
434 The input to qhull appears to be less than %d dimensional, or a\n\
435 computation has overflowed.\n\n\
436 Qhull could not construct a clearly convex simplex from points:\n",
437  qh->hull_dim);
438  qh_printvertexlist(qh, fp, "", qh->facet_list, NULL, qh_ALL);
439  if (!qh_QUICKhelp)
440  qh_fprintf(qh, fp, 9377, "\n\
441 The center point is coplanar with a facet, or a vertex is coplanar\n\
442 with a neighboring facet. The maximum round off error for\n\
443 computing distances is %2.2g. The center point, facets and distances\n\
444 to the center point are as follows:\n\n", qh->DISTround);
445  qh_printpointid(qh, fp, "center point", qh->hull_dim, qh->interior_point, qh_IDunknown);
446  qh_fprintf(qh, fp, 9378, "\n");
447  FORALLfacets {
448  qh_fprintf(qh, fp, 9379, "facet");
449  FOREACHvertex_(facet->vertices)
450  qh_fprintf(qh, fp, 9380, " p%d", qh_pointid(qh, vertex->point));
451  zinc_(Zdistio);
452  qh_distplane(qh, qh->interior_point, facet, &dist);
453  qh_fprintf(qh, fp, 9381, " distance= %4.2g\n", dist);
454  }
455  if (!qh_QUICKhelp) {
456  if (qh->HALFspace)
457  qh_fprintf(qh, fp, 9382, "\n\
458 These points are the dual of the given halfspaces. They indicate that\n\
459 the intersection is degenerate.\n");
460  qh_fprintf(qh, fp, 9383,"\n\
461 These points either have a maximum or minimum x-coordinate, or\n\
462 they maximize the determinant for k coordinates. Trial points\n\
463 are first selected from points that maximize a coordinate.\n");
464  if (qh->hull_dim >= qh_INITIALmax)
465  qh_fprintf(qh, fp, 9384, "\n\
466 Because of the high dimension, the min x-coordinate and max-coordinate\n\
467 points are used if the determinant is non-zero. Option 'Qs' will\n\
468 do a better, though much slower, job. Instead of 'Qs', you can change\n\
469 the points by randomly rotating the input with 'QR0'.\n");
470  }
471  qh_fprintf(qh, fp, 9385, "\nThe min and max coordinates for each dimension are:\n");
472  for (k=0; k < qh->hull_dim; k++) {
473  min= REALmax;
474  max= -REALmin;
475  for (i=qh->num_points, coord= qh->first_point+k; i--; coord += qh->hull_dim) {
476  maximize_(max, *coord);
477  minimize_(min, *coord);
478  }
479  qh_fprintf(qh, fp, 9386, " %d: %8.4g %8.4g difference= %4.4g\n", k, min, max, max-min);
480  }
481  if (!qh_QUICKhelp) {
482  qh_fprintf(qh, fp, 9387, "\n\
483 If the input should be full dimensional, you have several options that\n\
484 may determine an initial simplex:\n\
485  - use 'QJ' to joggle the input and make it full dimensional\n\
486  - use 'QbB' to scale the points to the unit cube\n\
487  - use 'QR0' to randomly rotate the input for different maximum points\n\
488  - use 'Qs' to search all points for the initial simplex\n\
489  - use 'En' to specify a maximum roundoff error less than %2.2g.\n\
490  - trace execution with 'T3' to see the determinant for each point.\n",
491  qh->DISTround);
492 #if REALfloat
493  qh_fprintf(qh, fp, 9388, "\
494  - recompile qhull for realT precision(#define REALfloat 0 in libqhull_r.h).\n");
495 #endif
496  qh_fprintf(qh, fp, 9389, "\n\
497 If the input is lower dimensional:\n\
498  - use 'QJ' to joggle the input and make it full dimensional\n\
499  - use 'Qbk:0Bk:0' to delete coordinate k from the input. You should\n\
500  pick the coordinate with the least range. The hull will have the\n\
501  correct topology.\n\
502  - determine the flat containing the points, rotate the points\n\
503  into a coordinate plane, and delete the other coordinates.\n\
504  - add one or more points to make the input full dimensional.\n\
505 ");
506  }
507 } /* printhelp_singular */
508 
509 /*-<a href="qh-globa_r.htm#TOC"
510  >-------------------------------</a><a name="user_memsizes">-</a>
511 
512  qh_user_memsizes(qh)
513  allocate up to 10 additional, quick allocation sizes
514 
515  notes:
516  increase maximum number of allocations in qh_initqhull_mem()
517 */
519 
521  /* qh_memsize(qh, size); */
522 } /* user_memsizes */
523 
524 
qh_ERRinput
#define qh_ERRinput
Definition: libqhull.h:194
qh_version
const char qh_version[]
Definition: global.c:50
QHULL_LIB_CHECK
#define QHULL_LIB_CHECK
Definition: libqhull.h:462
coordT
#define coordT
Definition: libqhull.h:80
qh_zero
void qh_zero(qhT *qh, FILE *errfile)
Definition: global_r.c:2095
qh_CPUclock
#define qh_CPUclock
Definition: user.h:211
qh_printvertex
void qh_printvertex(FILE *fp, vertexT *vertex)
Definition: io.c:3224
qh_new_qhull
int qh_new_qhull(qhT *qh, int dim, int numpoints, coordT *points, boolT ismalloc, char *qhull_cmd, FILE *outfile, FILE *errfile)
Definition: user_r.c:122
FORALLfacet_
#define FORALLfacet_(facetlist)
Definition: poly.h:77
qh_printfacet
void qh_printfacet(FILE *fp, facetT *facet)
Definition: io.c:1944
qh_printvertexlist
void qh_printvertexlist(FILE *fp, const char *string, facetT *facetlist, setT *facets, boolT printall)
Definition: io.c:3266
qh_ALL
#define qh_ALL
Definition: libqhull.h:180
FOREACHfacet_
#define FOREACHfacet_(facets)
Definition: libqhull.h:891
zzval_
#define zzval_(id)
Definition: stat.h:413
qh_printafacet
void qh_printafacet(FILE *fp, qh_PRINT format, facetT *facet, boolT printall)
Definition: io.c:1113
qh_check_output
void qh_check_output(void)
Definition: poly2.c:302
realT
#define realT
Definition: user.h:154
vertexT::point
pointT * point
Definition: libqhull.h:399
qhT
Definition: libqhull.h:465
qh_printridge
void qh_printridge(FILE *fp, ridgeT *ridge)
Definition: io.c:3020
qh_IDunknown
@ qh_IDunknown
Definition: libqhull.h:99
qh_printhelp_singular
void qh_printhelp_singular(qhT *qh, FILE *fp)
Definition: user_r.c:427
qh_printstatistics
void qh_printstatistics(FILE *fp, const char *string)
Definition: stat.c:578
qh_memcheck
void qh_memcheck(void)
Definition: mem.c:203
zinc_
#define zinc_(id)
Definition: stat.h:386
facetT
Definition: libqhull.h:262
ridgeT::bottom
facetT * bottom
Definition: libqhull.h:375
ridgeT::top
facetT * top
Definition: libqhull.h:374
qh_PRINTfacets
@ qh_PRINTfacets
Definition: libqhull.h:164
boolT
#define boolT
Definition: libqhull.h:121
qh_check_points
void qh_check_points(void)
Definition: poly2.c:365
qh_qh
qhT qh_qh
Definition: global.c:26
dim
int dim
otherfacet_
#define otherfacet_(ridge, facet)
Definition: libqhull.h:813
FORALLfacets
#define FORALLfacets
Definition: libqhull.h:840
False
#define False
Definition: libqhull.h:128
setT
Definition: qset.h:83
trace1
#define trace1(args)
Definition: qhull_a.h:81
REALmax
#define REALmax
Definition: user.h:155
qh_QUICKhelp
#define qh_QUICKhelp
Definition: user.h:643
qh
#define qh
Definition: libqhull.h:457
qh_freeqhull
void qh_freeqhull(boolT allmem)
Definition: global.c:425
qh_printpointid
void qh_printpointid(FILE *fp, const char *string, int dim, pointT *point, int id)
Definition: io.c:2858
ridgeT
Definition: libqhull.h:371
Zsetplane
@ Zsetplane
Definition: stat.h:246
qh_setfeasible
void qh_setfeasible(int dim)
Definition: io.c:3967
qh_printfacetlist
void qh_printfacetlist(qhT *qh, facetT *facetlist, setT *facets, boolT printall)
Definition: user_r.c:312
qh_sethalfspace_all
coordT * qh_sethalfspace_all(int dim, int count, coordT *halfspaces, pointT *feasible)
Definition: geom2.c:1918
qh_errexit
void qh_errexit(qhT *qh, int exitcode, facetT *facet, ridgeT *ridge)
Definition: user_r.c:200
qhull_ra.h
qh_exit
void qh_exit(int exitcode)
Definition: usermem_r-cpp.cpp:36
REALmin
#define REALmin
Definition: user.h:156
minimize_
#define minimize_(minval, val)
Definition: geom.h:59
qh_printsummary
void qh_printsummary(FILE *fp)
Definition: libqhull.c:1205
qh_pointid
int qh_pointid(pointT *point)
Definition: poly.c:1053
qh_distplane
void qh_distplane(pointT *point, facetT *facet, realT *dist)
Definition: geom.c:36
qh_prepare_output
void qh_prepare_output(void)
Definition: io.c:1071
qh_produce_output
void qh_produce_output(void)
Definition: io.c:39
qh_free
void qh_free(void *mem)
Definition: usermem.c:77
qh_ERRprec
#define qh_ERRprec
Definition: libqhull.h:196
qh_INITIALmax
#define qh_INITIALmax
Definition: user.h:420
qh_ERRqhull
#define qh_ERRqhull
Definition: libqhull.h:198
qh_qhull
void qh_qhull(void)
Definition: libqhull.c:60
Zdistio
@ Zdistio
Definition: stat.h:106
QHULL_UNUSED
#define QHULL_UNUSED(x)
Definition: qhull_a.h:109
qh_memfreeshort
void qh_memfreeshort(int *curlong, int *totlong)
Definition: mem.c:288
qh_printend
void qh_printend(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall)
Definition: io.c:1690
qh_initflags
void qh_initflags(char *command)
Definition: global.c:615
vertexT
Definition: libqhull.h:396
qh_printhelp_narrowhull
void qh_printhelp_narrowhull(qhT *qh, FILE *fp, realT minangle)
Definition: user_r.c:410
FOREACHvertex_
#define FOREACHvertex_(vertices)
Definition: libqhull.h:950
qh_printneighborhood
void qh_printneighborhood(FILE *fp, qh_PRINT format, facetT *facetA, facetT *facetB, boolT printall)
Definition: io.c:2809
qh_PRINTEND
@ qh_PRINTEND
Definition: libqhull.h:172
qh_printstats
void qh_printstats(FILE *fp, int idx, int *nextindex)
Definition: stat.c:674
Ztotmerge
@ Ztotmerge
Definition: stat.h:250
qh_fprintf
void qh_fprintf(FILE *fp, int msgcode, const char *fmt,...)
Definition: userprintf.c:42
qh_errprint
void qh_errprint(qhT *qh, const char *string, facetT *atfacet, facetT *otherfacet, ridgeT *atridge, vertexT *atvertex)
Definition: user_r.c:264
maximize_
#define maximize_(maxval, val)
Definition: geom.h:51
qh_meminit
void qh_meminit(FILE *ferr)
Definition: mem.c:317
qh_printhelp_degenerate
void qh_printhelp_degenerate(qhT *qh, FILE *fp)
Definition: user_r.c:333
qh_user_memsizes
void qh_user_memsizes(qhT *qh)
Definition: user_r.c:518
qh_init_B
void qh_init_B(coordT *points, int numpoints, int dim, boolT ismalloc)
Definition: global.c:534
qh_initqhull_start
void qh_initqhull_start(FILE *infile, FILE *outfile, FILE *errfile)
Definition: global.c:1827
qh_collectstatistics
void qh_collectstatistics(void)
Definition: stat.c:316
facetT::vertices
setT * vertices
Definition: libqhull.h:295
qh_ERRsingular
#define qh_ERRsingular
Definition: libqhull.h:195
qh_memstatistics
void qh_memstatistics(FILE *fp)
Definition: mem.c:431
True
#define True
Definition: libqhull.h:129
qh_printbegin
void qh_printbegin(FILE *fp, qh_PRINT format, facetT *facetlist, setT *facets, boolT printall)
Definition: io.c:1309


hpp-fcl
Author(s):
autogenerated on Fri Jan 26 2024 03:46:15