Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3290d19

Browse files
authored
Merge pull request #7747 from ianthomas23/update_qhull_2015.2
Update qhull to 2015.2
2 parents b1f4820 + 9a658c0 commit 3290d19

32 files changed

+1104
-619
lines changed

doc/api/api_changes/2017-01-06-IT.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Updated qhull to 2015.2
2+
```````````````````````
3+
4+
The version of qhull shipped with Matplotlib, which is used for
5+
Delaunay triangulation, has been updated from version 2012.1 to
6+
2015.2.
Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
Qhull, Copyright (c) 1993-2012
2-
1+
Qhull, Copyright (c) 1993-2015
2+
33
C.B. Barber
4-
Arlington, MA
5-
4+
Arlington, MA
5+
66
and
77

88
The National Science and Technology Research Center for
@@ -12,27 +12,27 @@
1212

1313
1414

15-
This software includes Qhull from C.B. Barber and The Geometry Center.
16-
Qhull is copyrighted as noted above. Qhull is free software and may
17-
be obtained via http from www.qhull.org. It may be freely copied, modified,
15+
This software includes Qhull from C.B. Barber and The Geometry Center.
16+
Qhull is copyrighted as noted above. Qhull is free software and may
17+
be obtained via http from www.qhull.org. It may be freely copied, modified,
1818
and redistributed under the following conditions:
1919

2020
1. All copyright notices must remain intact in all files.
2121

22-
2. A copy of this text file must be distributed along with any copies
23-
of Qhull that you redistribute; this includes copies that you have
24-
modified, or copies of programs or other software products that
22+
2. A copy of this text file must be distributed along with any copies
23+
of Qhull that you redistribute; this includes copies that you have
24+
modified, or copies of programs or other software products that
2525
include Qhull.
2626

2727
3. If you modify Qhull, you must include a notice giving the
2828
name of the person performing the modification, the date of
2929
modification, and the reason for such modification.
3030

31-
4. When distributing modified versions of Qhull, or other software
32-
products that include Qhull, you must provide notice that the original
31+
4. When distributing modified versions of Qhull, or other software
32+
products that include Qhull, you must provide notice that the original
3333
source code may be obtained as noted above.
3434

35-
5. There is no warranty or other guarantee of fitness for Qhull, it is
36-
provided solely "as is". Bug reports or fixes may be sent to
37-
[email protected]; the authors may or may not act on them as
35+
5. There is no warranty or other guarantee of fitness for Qhull, it is
36+
provided solely "as is". Bug reports or fixes may be sent to
37+
[email protected]; the authors may or may not act on them as
3838
they desire.

extern/qhull/geom.c renamed to extern/libqhull/geom.c

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
77
see qh-geom.htm and geom.h
88
9-
Copyright (c) 1993-2012 The Geometry Center.
10-
$Id: //main/2011/qhull/src/libqhull/geom.c#3 $$Change: 1464 $
11-
$DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
9+
Copyright (c) 1993-2015 The Geometry Center.
10+
$Id: //main/2015/qhull/src/libqhull/geom.c#2 $$Change: 1995 $
11+
$DateTime: 2015/10/13 21:59:42 $$Author: bbarber $
1212
1313
infrequent code goes into geom2.c
1414
*/
@@ -465,7 +465,7 @@ facetT *qh_findbestnew(pointT *point, facetT *startfacet,
465465
} /* end of !flipped */
466466
} /* FORALLfacet from startfacet or qh newfacet_list */
467467
}
468-
if (testhorizon || !bestfacet)
468+
if (testhorizon || !bestfacet) /* testhorizon is always True. Keep the same code as qh_findbest */
469469
bestfacet= qh_findbesthorizon(!qh_IScheckmax, point, bestfacet ? bestfacet : startfacet,
470470
!qh_NOupper, &bestdist, numpart);
471471
*dist= bestdist;
@@ -502,7 +502,7 @@ facetT *qh_findbestnew(pointT *point, facetT *startfacet,
502502
notes:
503503
assumes numrow == numcol-1
504504
505-
see Golub & van Loan 4.4-9 for back substitution
505+
see Golub & van Loan, 1983, Eq. 4.4-9 for "Gaussian elimination with complete pivoting"
506506
507507
solves Ux=b where Ax=b and PA=LU
508508
b= [0,...,0,sign or 0] (sign is either -1 or +1)
@@ -682,7 +682,7 @@ pointT *qh_getcenter(setT *vertices) {
682682
*coord= 0.0;
683683
FOREACHvertex_(vertices)
684684
*coord += vertex->point[k];
685-
*coord /= count;
685+
*coord /= count; /* count>=2 by QH6003 */
686686
}
687687
return(center);
688688
} /* getcenter */
@@ -801,7 +801,7 @@ void qh_normalize(coordT *normal, int dim, boolT toporient) {
801801
if nearzero
802802
sets norm to direction of maximum value
803803
*/
804-
void qh_normalize2 (coordT *normal, int dim, boolT toporient,
804+
void qh_normalize2(coordT *normal, int dim, boolT toporient,
805805
realT *minnorm, boolT *ismin) {
806806
int k;
807807
realT *colp, *maxp, norm= 0, temp, *norm1, *norm2, *norm3;
@@ -894,7 +894,7 @@ pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist) {
894894
pointT *newpoint, *np, *normal;
895895
int normsize= qh normal_size;
896896
int k;
897-
void **freelistp; /* used !qh_NOmem */
897+
void **freelistp; /* used if !qh_NOmem by qh_memalloc_() */
898898

899899
qh_memalloc_(normsize, freelistp, newpoint, pointT);
900900
np= newpoint;
@@ -932,7 +932,7 @@ void qh_setfacetplane(facetT *facet) {
932932
int normsize= qh normal_size;
933933
int k,i, oldtrace= 0;
934934
realT dist;
935-
void **freelistp; /* used !qh_NOmem */
935+
void **freelistp; /* used if !qh_NOmem by qh_memalloc_() */
936936
coordT *coord, *gmcoord;
937937
pointT *point0= SETfirstt_(facet->vertices, vertexT)->point;
938938
boolT nearzero= False;
@@ -1110,7 +1110,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
11101110
if (dim == 2) {
11111111
normal[0]= dY(1,0);
11121112
normal[1]= dX(0,1);
1113-
qh_normalize2 (normal, dim, toporient, NULL, NULL);
1113+
qh_normalize2(normal, dim, toporient, NULL, NULL);
11141114
*offset= -(point0[0]*normal[0]+point0[1]*normal[1]);
11151115
*nearzero= False; /* since nearzero norm => incident points */
11161116
}else if (dim == 3) {
@@ -1120,7 +1120,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
11201120
dX(2,0), dZ(2,0));
11211121
normal[2]= det2_(dX(2,0), dY(2,0),
11221122
dX(1,0), dY(1,0));
1123-
qh_normalize2 (normal, dim, toporient, NULL, NULL);
1123+
qh_normalize2(normal, dim, toporient, NULL, NULL);
11241124
*offset= -(point0[0]*normal[0] + point0[1]*normal[1]
11251125
+ point0[2]*normal[2]);
11261126
maxround= qh DISTround;
@@ -1148,7 +1148,7 @@ void qh_sethyperplane_det(int dim, coordT **rows, coordT *point0,
11481148
normal[3]= det3_(dX(2,0), dY(2,0), dZ(2,0),
11491149
dX(1,0), dY(1,0), dZ(1,0),
11501150
dX(3,0), dY(3,0), dZ(3,0));
1151-
qh_normalize2 (normal, dim, toporient, NULL, NULL);
1151+
qh_normalize2(normal, dim, toporient, NULL, NULL);
11521152
*offset= -(point0[0]*normal[0] + point0[1]*normal[1]
11531153
+ point0[2]*normal[2] + point0[3]*normal[3]);
11541154
maxround= qh DISTround;
@@ -1229,3 +1229,6 @@ void qh_sethyperplane_gauss(int dim, coordT **rows, pointT *point0,
12291229
for (k=dim-1; k--; )
12301230
*offset -= *pointcoord++ * *normalcoef++;
12311231
} /* sethyperplane_gauss */
1232+
1233+
1234+

extern/qhull/geom.h renamed to extern/libqhull/geom.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@
66
77
see qh-geom.htm and geom.c
88
9-
Copyright (c) 1993-2012 The Geometry Center.
10-
$Id: //main/2011/qhull/src/libqhull/geom.h#3 $$Change: 1464 $
11-
$DateTime: 2012/01/25 22:58:41 $$Author: bbarber $
9+
Copyright (c) 1993-2015 The Geometry Center.
10+
$Id: //main/2015/qhull/src/libqhull/geom.h#1 $$Change: 1981 $
11+
$DateTime: 2015/09/28 20:26:32 $$Author: bbarber $
1212
*/
1313

1414
#ifndef qhDEFgeom
@@ -113,7 +113,7 @@ pointT *qh_getcenter(setT *vertices);
113113
pointT *qh_getcentrum(facetT *facet);
114114
realT qh_getdistance(facetT *facet, facetT *neighbor, realT *mindist, realT *maxdist);
115115
void qh_normalize(coordT *normal, int dim, boolT toporient);
116-
void qh_normalize2 (coordT *normal, int dim, boolT toporient,
116+
void qh_normalize2(coordT *normal, int dim, boolT toporient,
117117
realT *minnorm, boolT *ismin);
118118
pointT *qh_projectpoint(pointT *point, facetT *facet, realT dist);
119119

@@ -171,3 +171,6 @@ coordT *qh_sethalfspace_all(int dim, int count, coordT *halfspaces, pointT *feas
171171
pointT *qh_voronoi_center(int dim, setT *points);
172172

173173
#endif /* qhDEFgeom */
174+
175+
176+

0 commit comments

Comments
 (0)