QhullPoints_test.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (p) 2009-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/qhulltest/QhullPoints_test.cpp#3 $$Change: 2062 $
5 ** $DateTime: 2016/01/17 13:13:18 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 //pre-compiled header
10 #include <iostream>
11 #include "qhulltest/RoadTest.h" // QT_VERSION
12 
14 #include "libqhullcpp/RboxPoints.h"
15 #include "libqhullcpp/Qhull.h"
16 
17 using std::cout;
18 using std::endl;
19 using std::ostringstream;
20 
21 namespace orgQhull {
22 
23 class QhullPoints_test : public RoadTest
24 {
25  Q_OBJECT
26 
27 #
28 private slots:
29  void cleanup();
30  void t_construct_q();
31  void t_construct_qh();
32  void t_convert();
33  void t_getset();
34  void t_element();
35  void t_iterator();
36  void t_const_iterator();
37  void t_search();
38  void t_points_iterator();
39  void t_io();
40 };//QhullPoints_test
41 
42 void
44 {
45  new QhullPoints_test(); // RoadTest::s_testcases
46 }
47 
48 //Executed after each testcase
51 {
53 }
54 
57 {
58  Qhull q;
59  QhullPoints ps(q);
60  QCOMPARE(ps.dimension(), 0);
61  QVERIFY(ps.isEmpty());
62  QCOMPARE(ps.count(), 0);
63  QCOMPARE(ps.size(), 0u);
64  QCOMPARE(ps.coordinateCount(), 0);
65  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
66  QhullPoints ps2(q);
67  ps2.defineAs(2, 6, c);
68  QCOMPARE(ps2.dimension(), 2);
69  QVERIFY(!ps2.isEmpty());
70  QCOMPARE(ps2.count(), 3);
71  QCOMPARE(ps2.size(), 3u);
72  QCOMPARE(ps2.coordinates(), c);
73  QhullPoints ps3(q, 2, 6, c);
74  QCOMPARE(ps3.dimension(), 2);
75  QVERIFY(!ps3.isEmpty());
76  QCOMPARE(ps3.coordinates(), ps2.coordinates());
77  QVERIFY(ps3==ps2);
78  QVERIFY(ps3!=ps);
79  QhullPoints ps4= ps3;
80  QVERIFY(ps4==ps3);
81  // ps4= ps3; //compiler error
82  QhullPoints ps5(ps4);
83  QVERIFY(ps5==ps4);
84  QVERIFY(!(ps5!=ps4));
85  coordT c2[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
86  QhullPoints ps6(q, 2, 6, c2);
87  QVERIFY(ps6==ps2);
88 
89  RboxPoints rbox("c D2");
90  Qhull q2(rbox, "");
91  QhullPoints ps8(q2);
92  QCOMPARE(ps8.dimension(), 2);
93  QCOMPARE(ps8.count(), 0);
94  QCOMPARE(ps8.size(), 0u);
95  QCOMPARE(ps8.coordinateCount(), 0);
96  coordT c3[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
97  QhullPoints ps9(q2, 6, c3);
98  QCOMPARE(ps9.dimension(), 2);
99  QCOMPARE(ps9.coordinateCount(), 6);
100  QCOMPARE(ps9.count(), 3);
101  QCOMPARE(ps9.coordinates(), c3);
102  QCOMPARE(ps9, ps2); // DISTround
103  c3[1]= 1.0+1e-17;
104  QCOMPARE(ps9, ps2); // DISTround
105  c3[1]= 1.0+1e-15;
106  QVERIFY(ps9!=ps2); // DISTround
107 
108  ps9.defineAs(6, c2);
109  QCOMPARE(ps9.dimension(), 2);
110  QCOMPARE(ps9.coordinateCount(), 6);
111  QCOMPARE(ps9.count(), 3);
112  QCOMPARE(ps9.coordinates(), c2);
113 }//t_construct_q
114 
117 {
118  Qhull q;
119  QhullQh *qh= q.qh();
120  QhullPoints ps(qh);
121  QCOMPARE(ps.dimension(), 0);
122  QVERIFY(ps.isEmpty());
123  QCOMPARE(ps.count(), 0);
124  QCOMPARE(ps.size(), 0u);
125  QCOMPARE(ps.coordinateCount(), 0);
126  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
127  QhullPoints ps2(qh);
128  ps2.defineAs(2, 6, c);
129  QCOMPARE(ps2.dimension(), 2);
130  QVERIFY(!ps2.isEmpty());
131  QCOMPARE(ps2.count(), 3);
132  QCOMPARE(ps2.size(), 3u);
133  QCOMPARE(ps2.coordinates(), c);
134  QhullPoints ps3(qh, 2, 6, c);
135  QCOMPARE(ps3.dimension(), 2);
136  QVERIFY(!ps3.isEmpty());
137  QCOMPARE(ps3.coordinates(), ps2.coordinates());
138  QVERIFY(ps3==ps2);
139  QVERIFY(ps3!=ps);
140  QhullPoints ps4= ps3;
141  QVERIFY(ps4==ps3);
142  // ps4= ps3; //compiler error
143  QhullPoints ps5(ps4);
144  QVERIFY(ps5==ps4);
145  QVERIFY(!(ps5!=ps4));
146  coordT c2[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
147  QhullPoints ps6(qh, 2, 6, c2);
148  QVERIFY(ps6==ps2);
149 
150  RboxPoints rbox("c D2");
151  Qhull q2(rbox, "");
152  QhullPoints ps8(q2.qh());
153  QCOMPARE(ps8.dimension(), 2);
154  QCOMPARE(ps8.count(), 0);
155  QCOMPARE(ps8.size(), 0u);
156  QCOMPARE(ps8.coordinateCount(), 0);
157  coordT c3[]= {10.0, 11.0, 12.0, 13.0, 14.0, 15.0};
158  QhullPoints ps9(q2.qh(), 6, c3);
159  QCOMPARE(ps9.dimension(), 2);
160  QCOMPARE(ps9.coordinateCount(), 6);
161  QCOMPARE(ps9.count(), 3);
162  QCOMPARE(ps9.coordinates(), c3);
163  ps9.defineAs(6, c2);
164  QCOMPARE(ps9.dimension(), 2);
165  QCOMPARE(ps9.coordinateCount(), 6);
166  QCOMPARE(ps9.count(), 3);
167  QCOMPARE(ps9.coordinates(), c2);
168 }//t_construct_qh
169 
172 {
173  Qhull q;
174  //defineAs tested above
175  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
176  QhullPoints ps(q, 3, 6, c);
177  QCOMPARE(ps.dimension(), 3);
178  QCOMPARE(ps.size(), 2u);
179  const coordT *c2= ps.constData();
180  QCOMPARE(c, c2);
181  const coordT *c3= ps.data();
182  QCOMPARE(c, c3);
183  coordT *c4= ps.data();
184  QCOMPARE(c, c4);
185  std::vector<QhullPoint> vs= ps.toStdVector();
186  QCOMPARE(vs.size(), 2u);
187  QhullPoint p= vs[1];
188  QCOMPARE(p[2], 5.0);
189  QList<QhullPoint> qs= ps.toQList();
190  QCOMPARE(qs.size(), 2);
191  QhullPoint p2= qs[1];
192  QCOMPARE(p2[2], 5.0);
193 }//t_convert
194 
197 {
198  Qhull q;
199  //See t_construct for coordinates, count, defineAs, dimension, isempty, ==, !=, size
200  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
201  QhullPoints ps(q, 3, 6, c);
202  QhullPoints ps2(q, 3, 6, c);
203  QCOMPARE(ps2.dimension(), 3);
204  QCOMPARE(ps2.coordinates(), c);
205  QCOMPARE(ps2.count(), 2);
206  QCOMPARE(ps2.coordinateCount(), 6);
207  coordT c2[]= {-1.0, -2.0, -3.0, -4.0, -5.0, -6.0};
208  ps2.defineAs(6, c2);
209  QCOMPARE(ps2.coordinates(), c2);
210  QCOMPARE(ps2.count(), 2);
211  QCOMPARE(ps2.size(), 2u);
212  QCOMPARE(ps2.dimension(), 3);
213  QVERIFY(!ps2.isEmpty());
214  QVERIFY(ps!=ps2);
215  // ps2= ps; // assignment not available, compiler error
216  ps2.defineAs(ps);
217  QVERIFY(ps==ps2);
218  ps2.setDimension(2);
219  QCOMPARE(ps2.dimension(), 2);
220  QCOMPARE(ps2.coordinates(), c);
221  QVERIFY(!ps2.isEmpty());
222  QCOMPARE(ps2.count(), 3);
223  QCOMPARE(ps2.size(), 3u);
224  QVERIFY(ps!=ps2);
225  QhullPoints ps3(ps2);
226  ps3.setDimension(3);
227  ps3.defineAs(5, c2);
228  QCOMPARE(ps3.count(), 1);
229  QCOMPARE(ps3.extraCoordinatesCount(), 2);
230  QCOMPARE(ps3.extraCoordinates()[0], -4.0);
231  QVERIFY(ps3.includesCoordinates(ps3.data()));
232  QVERIFY(ps3.includesCoordinates(ps3.data()+ps3.count()-1));
233  QVERIFY(!ps3.includesCoordinates(ps3.data()-1));
234  QVERIFY(!ps3.includesCoordinates(ps3.data()+ps3.coordinateCount()));
235 }//t_getset
236 
237 
240 {
241  Qhull q;
242  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
243  QhullPoints ps(q, 2, 6, c);
244  QCOMPARE(ps.count(), 3);
245  QhullPoint p(q, 2, c);
246  QCOMPARE(ps[0], p);
247  QCOMPARE(ps.at(1), ps[1]);
248  QCOMPARE(ps.first(), p);
249  QCOMPARE(ps.front(), ps.first());
250  QCOMPARE(ps.last(), ps.at(2));
251  QCOMPARE(ps.back(), ps.last());
252  QhullPoints ps2= ps.mid(2);
253  QCOMPARE(ps2.count(), 1);
254  QhullPoints ps3= ps.mid(3);
255  QVERIFY(ps3.isEmpty());
256  QhullPoints ps4= ps.mid(10);
257  QVERIFY(ps4.isEmpty());
258  QhullPoints ps5= ps.mid(-1);
259  QVERIFY(ps5.isEmpty());
260  QhullPoints ps6= ps.mid(1, 1);
261  QCOMPARE(ps6.count(), 1);
262  QCOMPARE(ps6[0], ps[1]);
263  QhullPoints ps7= ps.mid(1, 10);
264  QCOMPARE(ps7.count(), 2);
265  QCOMPARE(ps7[1], ps[2]);
266  QhullPoint p8(q);
267  QCOMPARE(ps.value(2), ps[2]);
268  QCOMPARE(ps.value(-1), p8);
269  QCOMPARE(ps.value(3), p8);
270  QCOMPARE(ps.value(3, p), p);
271  QVERIFY(ps.value(1, p)!=p);
272  foreach(QhullPoint p9, ps){ // Qt only
273  QCOMPARE(p9.dimension(), 2);
274  QVERIFY(p9[0]==0.0 || p9[0]==2.0 || p9[0]==4.0);
275  }
276 }//t_element
277 
280 {
281  Qhull q;
282  coordT c[]= {0.0, 1.0, 2.0};
283  QhullPoints ps(q, 1, 3, c);
284  QCOMPARE(ps.dimension(), 1);
285  QhullPoints::Iterator i(ps);
286  QhullPoints::iterator i2= ps.begin();
287  QVERIFY(i==i2);
288  QVERIFY(i>=i2);
289  QVERIFY(i<=i2);
290  i= ps.begin();
291  QVERIFY(i==i2);
292  i2= ps.end();
293  QVERIFY(i!=i2);
294  QhullPoint p(i); // QhullPoint is the base class for QhullPoints::iterator
295  QCOMPARE(p.dimension(), ps.dimension());
296  QCOMPARE(p.coordinates(), ps.coordinates());
297  i2--;
298  QhullPoint p2= *i2;
299  QCOMPARE(p[0], 0.0);
300  QCOMPARE(p2[0], 2.0);
301  QhullPoints::Iterator i5(i2);
302  QCOMPARE(*i2, *i5);
303  coordT c3[]= {0.0, -1.0, -2.0};
304  QhullPoints::Iterator i3(q, 1, c3);
305  QVERIFY(i!=i3);
306  QCOMPARE(*i, *i3);
307 
308  (i3= i)++;
309  QCOMPARE((*i3)[0], 1.0);
310  QCOMPARE(i3->dimension(), 1);
311  QCOMPARE(i3[0][0], 1.0);
312  QCOMPARE(i3[0], ps[1]);
313 
314  QVERIFY(i==i);
315  QVERIFY(i!=i2);
316  QVERIFY(i<i2);
317  QVERIFY(i<=i2);
318  QVERIFY(i2>i);
319  QVERIFY(i2>=i);
320 
322  QVERIFY(i==i4); // iterator COMP const_iterator
323  QVERIFY(i<=i4);
324  QVERIFY(i>=i4);
325  QVERIFY(i4==i); // const_iterator COMP iterator
326  QVERIFY(i4<=i);
327  QVERIFY(i4>=i);
328  QVERIFY(i>=i4);
329  QVERIFY(i4<=i);
330  QVERIFY(i2!=i4);
331  QVERIFY(i2>i4);
332  QVERIFY(i2>=i4);
333  QVERIFY(i4!=i2);
334  QVERIFY(i4<i2);
335  QVERIFY(i4<=i2);
336  ++i4;
337  QVERIFY(i<i4);
338  QVERIFY(i<=i4);
339  QVERIFY(i4>i);
340  QVERIFY(i4>=i);
341 
342  i= ps.begin();
343  i2= ps.begin();
344  QCOMPARE(i, i2++);
345  QCOMPARE(*i2, ps[1]);
346  QCOMPARE(++i, i2);
347  QCOMPARE(i, i2--);
348  QCOMPARE(i2, ps.begin());
349  QCOMPARE(--i, i2);
350  QCOMPARE(i2+=3, ps.end());
351  QCOMPARE(i2-=3, ps.begin());
352  QCOMPARE(i2+0, ps.begin());
353  QCOMPARE(i2+3, ps.end());
354  i2 += 3;
355  i= i2-0;
356  QCOMPARE(i, i2);
357  i= i2-3;
358  QCOMPARE(i, ps.begin());
359  QCOMPARE(i2-i, 3);
360 
361  //ps.begin end tested above
362 
363  // QhullPoints is const-only
364 }//t_iterator
365 
368 {
369  Qhull q;
370  coordT c[]= {0.0, 1.0, 2.0};
371  const QhullPoints ps(q, 1, 3, c);
374  QVERIFY(i==i2);
375  QVERIFY(i>=i2);
376  QVERIFY(i<=i2);
377  i= ps.begin();
378  QVERIFY(i==i2);
379  i2= ps.end();
380  QVERIFY(i!=i2);
381  QhullPoint p(i);
382  QCOMPARE(p.dimension(), ps.dimension());
383  QCOMPARE(p.coordinates(), ps.coordinates());
384  i2--;
385  QhullPoint p2= *i2;
386  QCOMPARE(p[0], 0.0);
387  QCOMPARE(p2[0], 2.0);
389  QCOMPARE(*i2, *i5);
390  coordT c3[]= {0.0, -1.0, -2.0};
391  QhullPoints::ConstIterator i3(q, 1, c3);
392  QVERIFY(i!=i3);
393  QCOMPARE(*i, *i3);
394 
395  (i3= i)++;
396  QCOMPARE((*i3)[0], 1.0);
397  QCOMPARE(i3->dimension(), 1);
398  QCOMPARE(i3[0][0], 1.0);
399  QCOMPARE(i3[0][0], 1.0);
400  QCOMPARE(i3[0], ps[1]);
401 
402  QVERIFY(i==i);
403  QVERIFY(i!=i2);
404  QVERIFY(i<i2);
405  QVERIFY(i<=i2);
406  QVERIFY(i2>i);
407  QVERIFY(i2>=i);
408 
409  // See t_iterator for const_iterator COMP iterator
410 
411  i= ps.begin();
412  i2= ps.constBegin();
413  QCOMPARE(i, i2++);
414  QCOMPARE(*i2, ps[1]);
415  QCOMPARE(++i, i2);
416  QCOMPARE(i, i2--);
417  QCOMPARE(i2, ps.constBegin());
418  QCOMPARE(--i, i2);
419  QCOMPARE(i2+=3, ps.constEnd());
420  QCOMPARE(i2-=3, ps.constBegin());
421  QCOMPARE(i2+0, ps.constBegin());
422  QCOMPARE(i2+3, ps.constEnd());
423  i2 += 3;
424  i= i2-0;
425  QCOMPARE(i, i2);
426  i= i2-3;
427  QCOMPARE(i, ps.constBegin());
428  QCOMPARE(i2-i, 3);
429 
430  // QhullPoints is const-only
431 }//t_const_iterator
432 
433 
436 {
437  Qhull q;
438  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 0, 1};
439  QhullPoints ps(q, 2, 8, c); //2-d array of 4 points
440  QhullPoint p= ps.first();
441  QhullPoint p2= ps.last();
442  QVERIFY(ps.contains(p));
443  QVERIFY(ps.contains(p2));
444  QVERIFY(p==p2);
445  QhullPoint p5= ps[2];
446  QVERIFY(p!=p5);
447  QVERIFY(ps.contains(p5));
448  coordT c2[]= {0.0, 1.0, 2.0, 3.0};
449  QhullPoint p3(q, 2, c2); //2-d point
450  QVERIFY(ps.contains(p3));
451  QhullPoint p4(q, 3, c2); //3-d point
452  QVERIFY(!ps.contains(p4));
453  p4.defineAs(2, c); //2-d point
454  QVERIFY(ps.contains(p4));
455  p4.defineAs(2, c+1); //2-d point
456  QVERIFY(!ps.contains(p4));
457  QhullPoint p6(q, 2, c2+2); //2-d point
458  QCOMPARE(ps.count(p), 2);
459  QCOMPARE(ps.count(p2), 2);
460  QCOMPARE(ps.count(p3), 2);
461  QCOMPARE(ps.count(p4), 0);
462  QCOMPARE(ps.count(p6), 1);
463  QCOMPARE(ps.indexOf(&ps[0][0]), 0);
464  //QCOMPARE(ps.indexOf(ps.end()), -1); //ps.end() is a QhullPoint which may match
465  QCOMPARE(ps.indexOf(0), -1);
466  QCOMPARE(ps.indexOf(&ps[3][0]), 3);
467  QCOMPARE(ps.indexOf(&ps[3][1], QhullError::NOthrow), 3);
468  QCOMPARE(ps.indexOf(ps.data()+ps.coordinateCount(), QhullError::NOthrow), -1);
469  QCOMPARE(ps.indexOf(p), 0);
470  QCOMPARE(ps.indexOf(p2), 0);
471  QCOMPARE(ps.indexOf(p3), 0);
472  QCOMPARE(ps.indexOf(p4), -1);
473  QCOMPARE(ps.indexOf(p5), 2);
474  QCOMPARE(ps.indexOf(p6), 1);
475  QCOMPARE(ps.lastIndexOf(p), 3);
476  QCOMPARE(ps.lastIndexOf(p4), -1);
477  QCOMPARE(ps.lastIndexOf(p6), 1);
478  QhullPoints ps3(q);
479  QCOMPARE(ps3.indexOf(ps3.data()), -1);
480  QCOMPARE(ps3.indexOf(ps3.data()+1, QhullError::NOthrow), -1);
481  QCOMPARE(ps3.indexOf(p), -1);
482  QCOMPARE(ps3.lastIndexOf(p), -1);
483  QhullPoints ps4(q, 2, 0, c);
484  QCOMPARE(ps4.indexOf(p), -1);
485  QCOMPARE(ps4.lastIndexOf(p), -1);
486 }//t_search
487 
490 {
491  Qhull q;
492  coordT c2[]= {0.0};
493  QhullPoints ps2(q, 0, 0, c2); // 0-dimensional
494  QhullPointsIterator i2= ps2;
495  QVERIFY(!i2.hasNext());
496  QVERIFY(!i2.hasPrevious());
497  i2.toBack();
498  QVERIFY(!i2.hasNext());
499  QVERIFY(!i2.hasPrevious());
500 
501  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
502  QhullPoints ps(q, 3, 6, c); // 3-dimensional
503  QhullPointsIterator i(ps);
504  i2= ps;
505  QVERIFY(i2.hasNext());
506  QVERIFY(!i2.hasPrevious());
507  QVERIFY(i.hasNext());
508  QVERIFY(!i.hasPrevious());
509  i2.toBack();
510  i.toFront();
511  QVERIFY(!i2.hasNext());
512  QVERIFY(i2.hasPrevious());
513  QVERIFY(i.hasNext());
514  QVERIFY(!i.hasPrevious());
515 
516  QhullPoint p= ps[0];
517  QhullPoint p2(ps[0]);
518  QCOMPARE(p, p2);
519  QVERIFY(p==p2);
520  QhullPoint p3(ps[1]);
521  // p2[0]= 0.0;
522  QVERIFY(p==p2);
523  QCOMPARE(i2.peekPrevious(), p3);
524  QCOMPARE(i2.previous(), p3);
525  QCOMPARE(i2.previous(), p);
526  QVERIFY(!i2.hasPrevious());
527  QCOMPARE(i.peekNext(), p);
528  // i.peekNext()= 1.0; // compiler error
529  QCOMPARE(i.next(), p);
530  QCOMPARE(i.peekNext(), p3);
531  QCOMPARE(i.next(), p3);
532  QVERIFY(!i.hasNext());
533  i.toFront();
534  QCOMPARE(i.next(), p);
535 }//t_points_iterator
536 
539 {
540  Qhull q;
541  QhullPoints ps(q);
542  ostringstream os;
543  os << "Empty QhullPoints\n" << ps << endl;
544  coordT c[]= {0.0, 1.0, 2.0, 3.0, 4.0, 5.0};
545  QhullPoints ps2(q, 3, 6, c); // 3-dimensional explicit
546  os << "QhullPoints from c[]\n" << ps2 << endl;
547 
548  RboxPoints rcube("c");
549  Qhull q2(rcube,"Qt QR0"); // triangulation of rotated unit cube
550  QhullPoints ps3= q2.points();
551  os << "QhullPoints\n" << ps3;
552  os << ps3.print("message\n");
553  os << ps3.printWithIdentifier("w/ identifiers\n");
554  cout << os.str();
555  QString s= QString::fromStdString(os.str());
556  QCOMPARE(s.count("p"), 8+1);
557 }//t_io
558 
559 }//orgQhull
560 
561 #include "moc/QhullPoints_test.moc"
orgQhull::QhullPoints::const_iterator
Definition: QhullPoints.h:189
orgQhull::QhullPoints::size
size_t size() const
Definition: QhullPoints.h:120
orgQhull::QhullPoints::coordinates
coordT * coordinates() const
Definition: QhullPoints.h:90
orgQhull::QhullPoints_test::t_iterator
void t_iterator()
Definition: QhullPoints_test.cpp:279
coordT
#define coordT
Definition: libqhull.h:80
orgQhull::QhullPoints::first
const QhullPoint first() const
Definition: QhullPoints.h:104
orgQhull::QhullPoints_test::t_construct_qh
void t_construct_qh()
Definition: QhullPoints_test.cpp:116
orgQhull::QhullPointsIterator::next
QhullPoint next()
Definition: QhullPoints.h:259
orgQhull::QhullPoints::coordinateCount
countT coordinateCount() const
Definition: QhullPoints.h:91
QhullPoints.h
orgQhull
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
orgQhull::QhullPointsIterator::hasPrevious
bool hasPrevious() const
Definition: QhullPoints.h:258
orgQhull::QhullPoints_test::t_element
void t_element()
Definition: QhullPoints_test.cpp:239
orgQhull::QhullPoints::last
const QhullPoint last() const
Definition: QhullPoints.h:112
orgQhull::QhullPoints::constBegin
ConstIterator constBegin() const
Definition: QhullPoints.h:87
orgQhull::QhullPoints
Java-style iterator.
Definition: QhullPoints.h:34
orgQhull::QhullPoint
Definition: QhullPoint.h:39
orgQhull::QhullPointsIterator
Definition: QhullPoints.h:242
orgQhull::QhullPoints::back
const QhullPoint back() const
Definition: QhullPoints.h:83
orgQhull::QhullError::NOthrow
@ NOthrow
Definition: QhullError.h:33
orgQhull::QhullPoints_test::t_construct_q
void t_construct_q()
Definition: QhullPoints_test.cpp:56
orgQhull::QhullPoints_test::t_points_iterator
void t_points_iterator()
Definition: QhullPoints_test.cpp:489
Qhull.h
q2
q2
orgQhull::QhullPointsIterator::toBack
void toBack()
Definition: QhullPoints.h:263
orgQhull::QhullPointsIterator::peekPrevious
QhullPoint peekPrevious() const
Definition: QhullPoints.h:261
orgQhull::QhullPoints_test
Definition: QhullPoints_test.cpp:23
orgQhull::QhullPoints::isEmpty
bool isEmpty() const
Definition: QhullPoints.h:110
rbox
rboxT rbox
Definition: rboxlib.c:65
orgQhull::QhullPoints_test::t_getset
void t_getset()
Definition: QhullPoints_test.cpp:196
orgQhull::QhullPoints_test::t_convert
void t_convert()
Definition: QhullPoints_test.cpp:171
orgQhull::QhullPointsIterator::previous
QhullPoint previous()
Definition: QhullPoints.h:262
orgQhull::QhullPointsIterator::peekNext
QhullPoint peekNext() const
Definition: QhullPoints.h:260
orgQhull::QhullPoints::setDimension
void setDimension(int d)
Definition: QhullPoints.h:119
orgQhull::Qhull
Interface to Qhull from C++.
Definition: Qhull.h:49
orgQhull::QhullPoints_test::t_io
void t_io()
Definition: QhullPoints_test.cpp:538
orgQhull::QhullPointsIterator::hasNext
bool hasNext() const
Definition: QhullPoints.h:257
orgQhull::QhullPoints::value
QhullPoint value(countT idx) const
Definition: QhullPoints.cpp:147
c
c
orgQhull::QhullPoints::data
const coordT * data() const
Definition: QhullPoints.h:93
qh
#define qh
Definition: libqhull.h:457
orgQhull::QhullPoints::extraCoordinatesCount
countT extraCoordinatesCount() const
Definition: QhullPoints.cpp:93
orgQhull::QhullQh
POD type equivalent to qhT. No virtual members.
Definition: QhullQh.h:58
q
q
orgQhull::QhullPoints::includesCoordinates
bool includesCoordinates(const coordT *c) const
Definition: QhullPoints.h:109
orgQhull::QhullPoints::iterator
Definition: QhullPoints.h:138
orgQhull::QhullPoint::dimension
int dimension() const
Definition: QhullPoint.h:95
orgQhull::QhullPoints::print
PrintPoints print(const char *message) const
Definition: QhullPoints.h:237
orgQhull::QhullPointsIterator::toFront
void toFront()
Definition: QhullPoints.h:264
orgQhull::QhullPoints::count
countT count() const
Definition: QhullPoints.h:92
orgQhull::QhullPoints::toStdVector
std::vector< QhullPoint > toStdVector() const
Definition: QhullPoints.cpp:79
orgQhull::RoadTest
Definition: RoadTest.h:54
orgQhull::RboxPoints
Definition: RboxPoints.h:37
orgQhull::QhullPoints::front
const QhullPoint front() const
Definition: QhullPoints.h:107
orgQhull::add_QhullPoints_test
void add_QhullPoints_test()
Definition: QhullPoints_test.cpp:43
orgQhull::QhullPoints::constData
const coordT * constData() const
Definition: QhullPoints.h:88
orgQhull::QhullPoints::dimension
int dimension() const
Definition: QhullPoints.h:98
orgQhull::QhullPoints::extraCoordinates
coordT * extraCoordinates() const
Definition: QhullPoints.h:101
RoadTest.h
orgQhull::QhullPoints::begin
ConstIterator begin() const
Definition: QhullPoints.h:85
orgQhull::QhullPoints_test::cleanup
void cleanup()
Definition: QhullPoints_test.cpp:50
orgQhull::QhullPoints::mid
QhullPoints mid(countT idx, countT length=-1) const
Returns a subset of the points, not a copy.
Definition: QhullPoints.cpp:256
orgQhull::QhullPoints::at
const QhullPoint at(countT idx) const
Definition: QhullPoints.h:81
orgQhull::QhullPoint::defineAs
void defineAs(coordT *c)
Definition: QhullPoint.h:92
orgQhull::QhullPoints::end
ConstIterator end() const
Definition: QhullPoints.h:99
orgQhull::QhullPoints::defineAs
void defineAs(int pointDimension, countT coordinatesCount, coordT *c)
Definition: QhullPoints.h:95
c2
c2
orgQhull::QhullPoints::lastIndexOf
countT lastIndexOf(const QhullPoint &t) const
Definition: QhullPoints.cpp:241
RboxPoints.h
orgQhull::QhullPoints_test::t_search
void t_search()
Definition: QhullPoints_test.cpp:435
orgQhull::QhullPoints::indexOf
countT indexOf(const coordT *pointCoordinates) const
Definition: QhullPoints.cpp:198
orgQhull::QhullPoints_test::t_const_iterator
void t_const_iterator()
Definition: QhullPoints_test.cpp:367
orgQhull::QhullPoints::contains
bool contains(const QhullPoint &t) const
Definition: QhullPoints.cpp:171
orgQhull::RoadTest::cleanup
void cleanup()
Executed after each test.
Definition: RoadTest.cpp:38
orgQhull::QhullPoints::constEnd
ConstIterator constEnd() const
Definition: QhullPoints.h:89


hpp-fcl
Author(s):
autogenerated on Fri Aug 2 2024 02:45:14