QhullSet.cpp
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (c) 2008-2015 C.B. Barber. All rights reserved.
4 ** $Id: //main/2015/qhull/src/libqhullcpp/QhullSet.cpp#3 $$Change: 2066 $
5 ** $DateTime: 2016/01/18 19:29:17 $$Author: bbarber $
6 **
7 ****************************************************************************/
8 
9 #
10 
11 #include "libqhullcpp/QhullSet.h"
12 
13 #include "libqhullcpp/Qhull.h"
14 #include "libqhullcpp/QhullError.h"
15 
16 #ifdef _MSC_VER // Microsoft Visual C++ -- warning level 4
17 #endif
18 
19 namespace orgQhull {
20 
21 #
22 
25 
26 #
27 
29 QhullSetBase(const Qhull &q, setT *s)
30 : qh_set(s ? s : &s_empty_set)
31 , qh_qh(q.qh())
32 {
33 }
34 
35 #
36 
37 // Same code for qh_setsize [qset_r.c] and QhullSetBase::count [static]
39 count(const setT *set)
40 {
41  countT size;
42  const setelemT *sizep;
43 
44  if (!set){
45  return(0);
46  }
47  sizep= SETsizeaddr_(set);
48  if ((size= sizep->i)) {
49  size--;
50  if (size > set->maxsize) {
51  // FIXUP QH11022 How to add additional output to a error? -- qh_setprint(qhmem.ferr, "set: ", set);
52  throw QhullError(10032, "QhullSet internal error: current set size %d is greater than maximum size %d\n",
53  size, set->maxsize);
54  }
55  }else{
56  size= set->maxsize;
57  }
58  return size;
59 }//count
60 
61 }//namespace orgQhull
62 
Definition: qset.h:83
QhullRidge – Qhull's ridge structure, ridgeT, as a C++ class.
Definition: Coordinates.cpp:21
QhullSetBase()
disabled since memory allocation for QhullSet not defined
Definition: QhullSet.h:62
qhT qh_qh
Definition: global.c:26
size_t size() const
Definition: QhullSet.h:73
#define qh
Definition: libqhull.h:457
Definition: qset.h:78
Interface to Qhull from C++.
Definition: Qhull.h:43
#define SETsizeaddr_(set)
Definition: qset.h:433
int i
Definition: qset.h:80
countT count() const
Definition: QhullSet.h:66
static setT s_empty_set
Definition: QhullSet.h:49
int countT
Definition: user_r.h:182


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:02