Update qhull to 2015.2 #7747

Merged
merged 1 commit into from Jan 13, 2017
Jump to file
+1,104 −619
Split
@@ -0,0 +1,6 @@
+Updated qhull to 2015.2
+```````````````````````
+
+The version of qhull shipped with Matplotlib, which is used for
+Delaunay triangulation, has been updated from version 2012.1 to
+2015.2.
@@ -1,8 +1,8 @@
- Qhull, Copyright (c) 1993-2012
-
+ Qhull, Copyright (c) 1993-2015
+
C.B. Barber
- Arlington, MA
-
+ Arlington, MA
+
and
The National Science and Technology Research Center for
@@ -12,27 +12,27 @@
email: qhull@qhull.org
-This software includes Qhull from C.B. Barber and The Geometry Center.
-Qhull is copyrighted as noted above. Qhull is free software and may
-be obtained via http from www.qhull.org. It may be freely copied, modified,
+This software includes Qhull from C.B. Barber and The Geometry Center.
+Qhull is copyrighted as noted above. Qhull is free software and may
+be obtained via http from www.qhull.org. It may be freely copied, modified,
and redistributed under the following conditions:
1. All copyright notices must remain intact in all files.
-2. A copy of this text file must be distributed along with any copies
- of Qhull that you redistribute; this includes copies that you have
- modified, or copies of programs or other software products that
+2. A copy of this text file must be distributed along with any copies
+ of Qhull that you redistribute; this includes copies that you have
+ modified, or copies of programs or other software products that
include Qhull.
3. If you modify Qhull, you must include a notice giving the
name of the person performing the modification, the date of
modification, and the reason for such modification.
-4. When distributing modified versions of Qhull, or other software
- products that include Qhull, you must provide notice that the original
+4. When distributing modified versions of Qhull, or other software
+ products that include Qhull, you must provide notice that the original
source code may be obtained as noted above.
-5. There is no warranty or other guarantee of fitness for Qhull, it is
- provided solely "as is". Bug reports or fixes may be sent to
- qhull_bug@qhull.org; the authors may or may not act on them as
+5. There is no warranty or other guarantee of fitness for Qhull, it is
+ provided solely "as is". Bug reports or fixes may be sent to
+ qhull_bug@qhull.org; the authors may or may not act on them as
they desire.
@@ -6,9 +6,9 @@
see qh-geom.htm and geom.h
- Copyright (c) 1993-2012 The Geometry Center.
- $Id: //main/2011/qhull/src/libqhull/geom.c#3 $$Change: 1464 $
- $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
+ Copyright (c) 1993-2015 The Geometry Center.
+ $Id: //main/2015/qhull/src/libqhull/geom.c#2 $$Change: 1995 $
+ $DateTime: 2015/10/13 21:59:42 $$Author: bbarber $
infrequent code goes into geom2.c
*/
@@ -465,7 +465,7 @@ facetT *qh_findbestnew(pointT *point, facetT *startfacet,
} /* end of !flipped */
} /* FORALLfacet from startfacet or qh newfacet_list */
}
- if (testhorizon || !bestfacet)
+ if (testhorizon || !bestfacet) /* testhorizon is always True. Keep the same code as qh_findbest */
bestfacet= qh_findbesthorizon(!qh_IScheckmax, point, bestfacet ? bestfacet : startfacet,
!qh_NOupper, &bestdist, numpart);
*dist= bestdist;
@@ -502,7 +502,7 @@ facetT *qh_findbestnew(pointT *point, facetT *startfacet,
notes:
assumes numrow == numcol-1
- see Golub & van Loan 4.4-9 for back substitution
+ see Golub & van Loan, 1983, Eq. 4.4-9 for "Gaussian elimination with complete pivoting"
solves Ux=b where Ax=b and PA=LU
b= [0,...,0,sign or 0] (sign is either -1 or +1)
@@ -682,7 +682,7 @@ pointT *qh_getcenter(setT *vertices) {
*coord= 0.0;
FOREACHvertex_(vertices)
*coord += vertex->point[k];
- *coord /= count;
+ *coord /= count; /* count>=2 by QH6003 */
}
return(center);
} /* getcenter */
@@ -801,7 +801,7 @@ void qh_normalize(coordT *normal, int dim, boolT toporient) {
if nearzero
sets norm to direction of maximum value
*/
-void qh_normalize2 (coordT *normal, int dim, boolT toporient,
+void qh_normalize2(coordT *normal, int dim, boolT toporient,
realT *minnorm, boolT *ismin) {
int k;
realT *colp, *maxp, norm= 0, temp, *norm1, *norm2, *norm3;
@@ -894,7 +894,7 @@ pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist) {
pointT *newpoint, *np, *normal;
int normsize= qh normal_size;
int k;
- void **freelistp; /* used !qh_NOmem */
+ void **freelistp; /* used if !qh_NOmem by qh_memalloc_() */
qh_memalloc_(normsize, freelistp, newpoint, pointT);
np= newpoint;
@@ -932,7 +932,7 @@ void qh_setfacetplane(facetT *facet) {
int normsize= qh normal_size;
int k,i, oldtrace= 0;
realT dist;
- void **freelistp; /* used !qh_NOmem */
+ void **freelistp; /* used if !qh_NOmem by qh_memalloc_() */
coordT *coord, *gmcoord;
pointT *point0= SETfirstt_(facet->vertices, vertexT)->point;
boolT nearzero= False;
@@ -1110,7 +1110,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
if (dim == 2) {
normal[0]= dY(1,0);
normal[1]= dX(0,1);
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
+ qh_normalize2(normal, dim, toporient, NULL, NULL);
*offset= -(point0[0]*normal[0]+point0[1]*normal[1]);
*nearzero= False; /* since nearzero norm => incident points */
}else if (dim == 3) {
@@ -1120,7 +1120,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
dX(2,0), dZ(2,0));
normal[2]= det2_(dX(2,0), dY(2,0),
dX(1,0), dY(1,0));
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
+ qh_normalize2(normal, dim, toporient, NULL, NULL);
*offset= -(point0[0]*normal[0] + point0[1]*normal[1]
+ point0[2]*normal[2]);
maxround= qh DISTround;
@@ -1148,7 +1148,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
normal[3]= det3_(dX(2,0), dY(2,0), dZ(2,0),
dX(1,0), dY(1,0), dZ(1,0),
dX(3,0), dY(3,0), dZ(3,0));
- qh_normalize2 (normal, dim, toporient, NULL, NULL);
+ qh_normalize2(normal, dim, toporient, NULL, NULL);
*offset= -(point0[0]*normal[0] + point0[1]*normal[1]
+ point0[2]*normal[2] + point0[3]*normal[3]);
maxround= qh DISTround;
@@ -1229,3 +1229,6 @@ void qh_sethyperplane_gauss(int dim, coordT **rows, pointT *point0,
for (k=dim-1; k--; )
*offset -= *pointcoord++ * *normalcoef++;
} /* sethyperplane_gauss */
+
+
+
@@ -6,9 +6,9 @@
see qh-geom.htm and geom.c
- Copyright (c) 1993-2012 The Geometry Center.
- $Id: //main/2011/qhull/src/libqhull/geom.h#3 $$Change: 1464 $
- $DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
+ Copyright (c) 1993-2015 The Geometry Center.
+ $Id: //main/2015/qhull/src/libqhull/geom.h#1 $$Change: 1981 $
+ $DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
*/
#ifndef qhDEFgeom
@@ -113,7 +113,7 @@ pointT *qh_getcenter(setT *vertices);
pointT *qh_getcentrum(facetT *facet);
realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
void qh_normalize(coordT *normal, int dim, boolT toporient);
-void qh_normalize2 (coordT *normal, int dim, boolT toporient,
+void qh_normalize2(coordT *normal, int dim, boolT toporient,
realT *minnorm, boolT *ismin);
pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
@@ -171,3 +171,6 @@ coordT *qh_sethalfspace_all(int dim, int count, coordT *halfspaces, pointT *feas
pointT *qh_voronoi_center(int dim, setT *points);
#endif /* qhDEFgeom */
+
+
+
Oops, something went wrong.