/usr/include/libqhull/qh-set.htm is in libqhull-dev 2015.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | <!-- Do not edit with Front Page, it adds too many spaces -->
<html>
<head>
<meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1">
<title>qset.c -- set data type and operations</title>
</head>
<body>
<!-- Navigation links -->
<p><a name="TOP"><b>Up:</b></a> <a
href="http://www.qhull.org">Home page</a> for Qhull<br>
<b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual</a>: Table of Contents <br>
<b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
• <a href="../../html/qh-quick.htm#options">Options</a>
• <a href="../../html/qh-opto.htm#output">Output</a>
• <a href="../../html/qh-optf.htm#format">Formats</a>
• <a href="../../html/qh-optg.htm#geomview">Geomview</a>
• <a href="../../html/qh-optp.htm#print">Print</a>
• <a href="../../html/qh-optq.htm#qhull">Qhull</a>
• <a href="../../html/qh-optc.htm#prec">Precision</a>
• <a href="../../html/qh-optt.htm#trace">Trace</a>
• <a href="index.htm">Functions</a><br>
<b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a><br>
<b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
<b>To:</b> <a href="qh-geom.htm">Geom</a> • <a href="qh-globa.htm">Global</a>
• <a href="qh-io.htm">Io</a> • <a href="qh-mem.htm">Mem</a>
• <a href="qh-merge.htm">Merge</a> • <a href="qh-poly.htm">Poly</a>
• <a href="qh-qhull.htm">Qhull</a> • <a href="qh-set.htm#TOC">Set</a>
• <a href="qh-stat.htm">Stat</a> • <a href="qh-user.htm">User</a>
</p>
<hr>
<h2>qset.c -- set data type and operations</h2>
<blockquote>
<p>Qhull's data structures are constructed from sets. The
functions and macros in qset.c construct, iterate, and
modify these sets. They are the most frequently called
functions in Qhull. For this reason, efficiency is the
primary concern. </p>
<p>In Qhull, a <i>set</i> is represented by an unordered
array of pointers with a maximum size and a NULL
terminator (<a href="qset.h#setT">setT</a>).
Most sets correspond to mathematical sets
(i.e., the pointers are unique). Some sets are sorted to
enforce uniqueness. Some sets are ordered. For example,
the order of vertices in a ridge determine the ridge's
orientation. If you reverse the order of adjacent
vertices, the orientation reverses. Some sets are not
mathematical sets. They may be indexed as an array and
they may include NULL pointers. </p>
<p>The most common operation on a set is to iterate its
members. This is done with a 'FOREACH...' macro. Each set
has a custom macro. For example, 'FOREACHvertex_'
iterates over a set of vertices. Each vertex is assigned
to the variable 'vertex' from the pointer 'vertexp'. </p>
<p>Most sets are constructed by appending elements to the
set. The last element of a set is either NULL or the
index of the terminating NULL for a partially full set.
If a set is full, appending an element copies the set to
a larger array. </p>
</blockquote>
<p><b>Copyright © 1995-2015 C.B. Barber</b></p>
<hr>
<p><a href="#TOP">»</a> <a href="qh-geom.htm#TOC">Geom</a>
<a name="TOC">•</a> <a href="qh-globa.htm#TOC">Global</a> •
<a href="qh-io.htm#TOC">Io</a> • <a href="qh-mem.htm#TOC">Mem</a> •
<a href="qh-merge.htm#TOC">Merge</a> • <a href="qh-poly.htm#TOC">Poly</a>
• <a href="qh-qhull.htm#TOC">Qhull</a> • <b>Set</b>
• <a href="qh-stat.htm#TOC">Stat</a> • <a href="qh-user.htm#TOC">User</a>
</p>
<h3>Index to <a href="qset.c">qset.c</a> and
<a href="qset.h">qset.h</a></h3>
<ul>
<li><a href="#stype">Data types and constants</a> </li>
<li><a href="#seach">FOREACH macros</a> </li>
<li><a href="#saccess">access and size macros</a> </li>
<li><a href="#sint">internal macros</a> </li>
<li><a href="#saddr">address macros</a><p> </li>
<li><a href="#snew">Allocation and deallocation functions</a> </li>
<li><a href="#spred">Access and predicate functions</a>
</li>
<li><a href="#sadd">Add functions</a> </li>
<li><a href="#scheck">Check and print functions</a></li>
<li><a href="#scopy">Copy, compact, and zero functions</a></li>
<li><a href="#sdel">Delete functions</a> </li>
<li><a href="#stemp">Temporary set functions</a> </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="stype">Data types and
constants</a></h3>
<ul>
<li><a href="qset.h#SETelemsize">SETelemsize</a> size
of a set element in bytes </li>
<li><a href="qset.h#setT">setT</a> a set with a
maximum size and a current size</li>
<li><a href="libqhull.h#qh-set">qh global sets</a>
global sets for temporary sets, etc. </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="seach">FOREACH macros</a></h3>
<ul>
<li><a href="qset.h#FOREACHelem_">FOREACHelem_</a>
assign 'elem' to each element in a set </li>
<li><a href="qset.h#FOREACHset_">FOREACHset_</a>
assign 'set' to each set in a set of sets </li>
<li><a href="qset.h#FOREACHsetelement_">FOREACHsetelement_</a>
define a FOREACH iterator </li>
<li><a href="qset.h#FOREACHsetelement_i_">FOREACHsetelement_i_</a>
define an indexed FOREACH iterator </li>
<li><a href="qset.h#FOREACHsetelementreverse_">FOREACHsetelementreverse_</a>
define a reversed FOREACH iterator </li>
<li><a href="qset.h#FOREACHsetelementreverse12_">FOREACHsetelementreverse12_</a>
define a FOREACH iterator with e[1] and e[0]
reversed </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="saccess">Access and
size macros</a></h3>
<ul>
<li><a href="qset.h#SETelem_">SETelem_</a> return the
n'th element of set </li>
<li><a href="qset.h#SETelemt_">SETelemt_</a> return
the n'th element of set as a type</li>
<li><a href="qset.h#SETempty_">SETempty_</a> return
true (1) if set is empty </li>
<li><a href="qset.h#SETfirst_">SETfirst_</a> return
first element of set </li>
<li><a href="qset.h#SETfirstt_">SETfirstt_</a> return
first element of set as a type</li>
<li><a href="qset.h#SETindex_">SETindex_</a> return
index of elem in set </li>
<li><a href="qset.h#SETreturnsize_">SETreturnsize_</a>
return size of a set (normally use <a href="qset.c#setsize">qh_setsize</a>) </li>
<li><a href="qset.h#SETsecond_">SETsecond_</a> return
second element of set </li>
<li><a href="qset.h#SETsecondt_">SETsecondt_</a>
return second element of set as a type</li>
<li><a href="qset.h#SETtruncate_">SETtruncate_</a>
truncate set to size, i.e., qh_settruncate()</li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="sint">Internal macros</a></h3>
<ul>
<li><a href="qset.c#SETsizeaddr_">SETsizeaddr_</a>
return pointer to end element of a set (indicates
current size) </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="saddr">address macros</a></h3>
<ul>
<li><a href="qset.h#SETaddr_">SETaddr_</a> return
address of a set's elements </li>
<li><a href="qset.h#SETelemaddr_">SETelemaddr_</a>
return address of the n'th element of a set </li>
<li><a href="qset.h#SETref_">SETref_</a> l.h.s. for
modifying the current element in a FOREACH
iteration </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="snew">Allocation and
deallocation functions</a></h3>
<ul>
<li><a href="qset.c#setfree">qh_setfree</a> free the
space occupied by a set </li>
<li><a href="qset.c#setfree2">qh_setfree2</a> free a
set and its elements </li>
<li><a href="qset.c#setfreelong">qh_setfreelong</a>
free a set only if it is in long memory </li>
<li><a href="qset.c#setnew">qh_setnew</a> create a new
set </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="spred">Access and
predicate functions </a></h3>
<ul>
<li><a href="qset.c#setendpointer">qh_setendpointer</a> return
pointer to NULL terminator of a set</li>
<li><a href="qset.c#setequal">qh_setequal</a> return 1
if two sorted sets are equal </li>
<li><a href="qset.c#setequal_except">qh_setequal_except</a>
return 1 if two sorted sets are equal except for
an element </li>
<li><a href="qset.c#setequal_skip">qh_setequal_skip</a>
return 1 if two sorted sets are equal except for
a pair of skipped elements </li>
<li><a href="qset.c#setequal_skip">qh_setequal_skip</a>
return 1 if two sorted sets are equal except for
a pair of skipped elements </li>
<li><a href="qset.c#setin">qh_setin</a> return 1 if an
element is in a set </li>
<li><a href="qset.c#setindex">qh_setindex</a> return
the index of an element in a set </li>
<li><a href="qset.c#setlast">qh_setlast</a> return
last element of a set</li>
<li><a href="qset.c#setsize">qh_setsize</a> returns
the size of a set </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="sadd">Add functions</a></h3>
<ul>
<li><a href="qset.c#setaddnth">qh_setaddnth</a> add a
element as n'th element of sorted or unsorted set
</li>
<li><a href="qset.c#setaddsorted">qh_setaddsorted</a>
add an element to a sorted set </li>
<li><a href="qset.c#setappend">qh_setappend</a> append
an element to a set </li>
<li><a href="qset.c#setappend_set">qh_setappend_set</a>
append a set of elements to a set </li>
<li><a href="qset.c#setappend2ndlast">qh_setappend2ndlast</a>
add an element as the next to the last element in
a set </li>
<li><a href="qset.c#setlarger">qh_setlarger</a> return
a larger set with the same elements</li>
<li><a href="qset.c#setreplace">qh_setreplace</a>
replace one element with another in a set</li>
<li><a href="qset.c#setunique">qh_setunique</a> add an
element if it is not already in a set </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="scheck">Check and print functions</a></h3>
<ul>
<li><a href="qset.c#setcheck">qh_setcheck</a> check a
set for validity </li>
<li><a href="qset.c#setprint">qh_setprint</a> print a
set's elements to fp </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="scopy">Copy, compact, and zero functions</a></h3>
<ul>
<li><a href="qset.c#setcompact">qh_setcompact</a>
compact NULLs from an unsorted set </li>
<li><a href="qset.c#setcopy">qh_setcopy</a> make a
copy of a sorted or unsorted set </li>
<li><a href="qset.c#setduplicate">qh_setduplicate</a>
duplicate a set and its elements </li>
<li><a href="qset.c#settruncate">qh_settruncate</a>
truncate a set to size elements </li>
<li><a href="qset.c#setzero">qh_setzero</a> zero the
remainder of a set </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="sdel">Delete functions</a></h3>
<ul>
<li><a href="qset.c#setdel">qh_setdel</a> delete an
element from an unsorted set. </li>
<li><a href="qset.c#setdellast">qh_setdellast</a>
delete and return last element from a set</li>
<li><a href="qset.c#setdelnth">qh_setdelnth</a> delete
and return nth element from an unsorted set </li>
<li><a href="qset.c#setdelnthsorted">qh_setdelnthsorted</a>
delete and return nth element from a sorted set </li>
<li><a href="qset.c#setdelsorted">qh_setdelsorted</a>
delete an element from a sorted set </li>
<li><a href="qset.c#setnew_delnthsorted">qh_setnew_delnthsorted</a>
create a sorted set not containing the nth
element </li>
</ul>
<h3><a href="qh-set.htm#TOC">»</a><a name="stemp">Temporary set functions</a></h3>
<ul>
<li><a href="qset.c#settemp">qh_settemp</a> return a
temporary set and append it qhmem.tempstack</li>
<li><a href="qset.c#settempfree">qh_settempfree</a>
free and pop a set from qhmem.tempstack</li>
<li><a href="qset.c#settempfree_all">qh_settempfree_all</a>
free all sets in qhmem.tempstack </li>
<li><a href="qset.c#settemppop">qh_settemppop</a> pop
a set from qhmem.tempstack (makes it permanent) </li>
<li><a href="qset.c#settemppush">qh_settemppush</a>
push a set unto qhmem.tempstack (makes it
temporary) </li>
</ul>
<p><!-- Navigation links --> </p>
<hr>
<p><b>Up:</b>
<a href="http://www.qhull.org">Home page for
Qhull</a> <br>
<b>Up:</b> <a href="../../html/index.htm#TOC">Qhull manual: Table of Contents</a> <br>
<b>Up:</b> <a href="../../html/qh-quick.htm#programs">Programs</a>
• <a href="../../html/qh-quick.htm#options">Options</a>
• <a href="../../html/qh-opto.htm#output">Output</a>
• <a href="../../html/qh-optf.htm#format">Formats</a>
• <a href="../../html/qh-optg.htm#geomview">Geomview</a>
• <a href="../../html/qh-optp.htm#print">Print</a>
• <a href="../../html/qh-optq.htm#qhull">Qhull</a>
• <a href="../../html/qh-optc.htm#prec">Precision</a>
• <a href="../../html/qh-optt.htm#trace">Trace</a>
• <a href="index.htm">Functions</a><br>
<b>Up:</b> <a href="../../html/qh-code.htm#TOC">Qhull code: Table of Contents</a> <br>
<b>To:</b> <a href="index.htm">Qhull functions</a>, macros, and data structures<br>
<b>To:</b> <a href="qh-geom.htm">Geom</a> •
<a href="qh-globa.htm">Global</a> • <a href="qh-io.htm">Io</a>
• <a href="qh-mem.htm">Mem</a> • <a href="qh-merge.htm">Merge</a>
• <a href="qh-poly.htm">Poly</a> • <a href="qh-qhull.htm#TOC">Qhull</a>
• <a href="qh-set.htm">Set</a> • <a href="qh-stat.htm">Stat</a>
• <a href="qh-user.htm">User</a><br>
</p>
<p><!-- GC common information --> </p>
<hr>
<p><a href="http://www.geom.uiuc.edu/"><img
src="../../html/qh--geom.gif" align="middle" width="40" height="40"></a><i>The
Geometry Center Home Page </i></p>
<p>Comments to: <a href=mailto:qhull@qhull.org>qhull@qhull.org</a>
</a><br>
Created: May 2, 1997 --- <!-- hhmts start --> Last modified: see top <!-- hhmts end --> </p>
</body>
</html>
|