Wed, 20 Dec 2023 16:46:14 +0100
bring back UCX test - fixes #341
390 | 1 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
2 | <html xmlns="http://www.w3.org/1999/xhtml"> | |
3 | <head> | |
4 | <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> | |
5 | <meta http-equiv="X-UA-Compatible" content="IE=9"/> | |
6 | <meta name="generator" content="Doxygen 1.8.13"/> | |
7 | <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
8 | <title>ucx: /home/mike/workspace/c/ucx/src/ucx/avl.h Source File</title> | |
9 | <link href="tabs.css" rel="stylesheet" type="text/css"/> | |
10 | <script type="text/javascript" src="jquery.js"></script> | |
11 | <script type="text/javascript" src="dynsections.js"></script> | |
12 | <link href="search/search.css" rel="stylesheet" type="text/css"/> | |
13 | <script type="text/javascript" src="search/searchdata.js"></script> | |
14 | <script type="text/javascript" src="search/search.js"></script> | |
15 | <link href="doxygen.css" rel="stylesheet" type="text/css" /> | |
16 | </head> | |
17 | <body> | |
18 | <div id="top"><!-- do not remove this div, it is closed by doxygen! --> | |
19 | <div id="titlearea"> | |
20 | <table cellspacing="0" cellpadding="0"> | |
21 | <tbody> | |
22 | <tr style="height: 56px;"> | |
23 | <td id="projectlogo"><img alt="Logo" src="uaplogo.png"/></td> | |
24 | <td id="projectalign" style="padding-left: 0.5em;"> | |
25 | <div id="projectname">ucx | |
26 | </div> | |
27 | <div id="projectbrief">UAP Common Extensions</div> | |
28 | </td> | |
29 | </tr> | |
30 | </tbody> | |
31 | </table> | |
32 | </div> | |
33 | <!-- end header part --> | |
34 | <!-- Generated by Doxygen 1.8.13 --> | |
35 | <script type="text/javascript"> | |
36 | var searchBox = new SearchBox("searchBox", "search",false,'Search'); | |
37 | </script> | |
38 | <script type="text/javascript" src="menudata.js"></script> | |
39 | <script type="text/javascript" src="menu.js"></script> | |
40 | <script type="text/javascript"> | |
41 | $(function() { | |
42 | initMenu('',true,false,'search.php','Search'); | |
43 | $(document).ready(function() { init_search(); }); | |
44 | }); | |
45 | </script> | |
46 | <div id="main-nav"></div> | |
47 | <!-- window showing the filter options --> | |
48 | <div id="MSearchSelectWindow" | |
49 | onmouseover="return searchBox.OnSearchSelectShow()" | |
50 | onmouseout="return searchBox.OnSearchSelectHide()" | |
51 | onkeydown="return searchBox.OnSearchSelectKey(event)"> | |
52 | </div> | |
53 | ||
54 | <!-- iframe showing the search results (closed by default) --> | |
55 | <div id="MSearchResultsWindow"> | |
56 | <iframe src="javascript:void(0)" frameborder="0" | |
57 | name="MSearchResults" id="MSearchResults"> | |
58 | </iframe> | |
59 | </div> | |
60 | ||
61 | <div id="nav-path" class="navpath"> | |
62 | <ul> | |
63 | <li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_69f4ea29401808fe6229564976cde3ce.html">ucx</a></li> </ul> | |
64 | </div> | |
65 | </div><!-- top --> | |
66 | <div class="header"> | |
67 | <div class="headertitle"> | |
68 | <div class="title">avl.h</div> </div> | |
69 | </div><!--header--> | |
70 | <div class="contents"> | |
71 | <a href="avl_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Copyright 2017 Mike Becker, Olaf Wintermann All rights reserved.</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> * Redistribution and use in source and binary forms, with or without</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * modification, are permitted provided that the following conditions are met:</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> *</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * 1. Redistributions of source code must retain the above copyright</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * notice, this list of conditions and the following disclaimer.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> *</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * notice, this list of conditions and the following disclaimer in the</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> * documentation and/or other materials provided with the distribution.</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> *</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> </div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> <span class="preprocessor">#ifndef UCX_AVL_H</span></div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> <span class="preprocessor">#define UCX_AVL_H</span></div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> </div><div class="line"><a name="l00045"></a><span class="lineno"> 45</span> <span class="preprocessor">#include "<a class="code" href="ucx_8h.html">ucx.h</a>"</span></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> <span class="preprocessor">#include "<a class="code" href="allocator_8h.html">allocator.h</a>"</span></div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="preprocessor">#include <inttypes.h></span></div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span> </div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00050"></a><span class="lineno"> 50</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00052"></a><span class="lineno"> 52</span> </div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="avl_8h.html#a08ba2496c2316df58548c3cc29712add"> 58</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a>;</div><div class="line"><a name="l00059"></a><span class="lineno"> 59</span> </div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html"> 63</a></span> <span class="keyword">struct </span><a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> {</div><div class="line"><a name="l00067"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6"> 67</a></span>  intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>;</div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#a302501b8c04c3fde668fe72249871258"> 71</a></span>  <span class="keywordtype">void</span> *<a class="code" href="structUcxAVLNode.html#a302501b8c04c3fde668fe72249871258">value</a>;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#af129fd32863a7c35e82c5cd9d11dc95a"> 75</a></span>  <span class="keywordtype">size_t</span> <a class="code" href="structUcxAVLNode.html#af129fd32863a7c35e82c5cd9d11dc95a">height</a>;</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#afc4e3b4f452aa2d91cabb2135b9d42f7"> 79</a></span>  <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="structUcxAVLNode.html#afc4e3b4f452aa2d91cabb2135b9d42f7">parent</a>;</div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#ad3a1c733f2c1cc81ac527f846fc24b9c"> 83</a></span>  <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="structUcxAVLNode.html#ad3a1c733f2c1cc81ac527f846fc24b9c">left</a>;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="structUcxAVLNode.html#a7cbaa31dba8c7a89f4f8f7905f6fd238"> 87</a></span>  <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="structUcxAVLNode.html#a7cbaa31dba8c7a89f4f8f7905f6fd238">right</a>;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span> };</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span> </div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="structUcxAVLTree.html"> 93</a></span> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div><div class="line"><a name="l00097"></a><span class="lineno"><a class="line" href="structUcxAVLTree.html#a30652776b540156ad54c7d52833e4e28"> 97</a></span>  <a class="code" href="structUcxAllocator.html">UcxAllocator</a> *<a class="code" href="structUcxAVLTree.html#a30652776b540156ad54c7d52833e4e28">allocator</a>;</div><div class="line"><a name="l00101"></a><span class="lineno"><a class="line" href="structUcxAVLTree.html#a393a8fc99eb2c290d3cb67170081d742"> 101</a></span>  <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="structUcxAVLTree.html#a393a8fc99eb2c290d3cb67170081d742">root</a>;</div><div class="line"><a name="l00106"></a><span class="lineno"><a class="line" href="structUcxAVLTree.html#a87aff25cb726cb9eb88eb815a10d1004"> 106</a></span>  <a class="code" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> <a class="code" href="structUcxAVLTree.html#a87aff25cb726cb9eb88eb815a10d1004">cmpfunc</a>;</div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="structUcxAVLTree.html#ae92a3bfad3fe33c8dcbdad85112f83fd"> 111</a></span>  <span class="keywordtype">void</span> *<a class="code" href="structUcxAVLTree.html#ae92a3bfad3fe33c8dcbdad85112f83fd">userdata</a>;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> } <a class="code" href="structUcxAVLTree.html">UcxAVLTree</a>;</div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span> </div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span> <a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *<a class="code" href="avl_8h.html#a11b043d65a11b7092d5d98b298e5ede3">ucx_avl_new</a>(<a class="code" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfunc);</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *<a class="code" href="avl_8h.html#af0f868d67e9dc08b4867c02a06c23ee2">ucx_avl_new_a</a>(<a class="code" href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a> cmpfunc, <a class="code" href="structUcxAllocator.html">UcxAllocator</a> *allocator);</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span> </div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span> <span class="keywordtype">void</span> <a class="code" href="avl_8h.html#a2f92db538f25fce908d2cb3e5590944c">ucx_avl_free</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree);</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span> </div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span> <span class="keywordtype">void</span> <a class="code" href="avl_8h.html#a31ad7fb196ca211f1fc39f4e15f72279">ucx_avl_free_content</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, <a class="code" href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a> destr);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span> </div><div class="line"><a name="l00173"></a><span class="lineno"><a class="line" href="avl_8h.html#ac2886d4b79b48c9fabf6408873f84cd2"> 173</a></span> <span class="preprocessor">#define ucx_avl_default_new() \</span></div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span> <span class="preprocessor"> ucx_avl_new_a(ucx_cmp_ptr, ucx_default_allocator())</span></div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span> </div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span> <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="avl_8h.html#acf42da9a4168e47dc10b4ba0d27ceb4e">ucx_avl_get_node</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>);</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span> </div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span> <span class="keywordtype">void</span> *<a class="code" href="avl_8h.html#adbcf7ceb3f014a30c7214f7304519efe">ucx_avl_get</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>);</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span> </div><div class="line"><a name="l00196"></a><span class="lineno"><a class="line" href="avl_8h.html#aaaf4a6f6f661cda7791db239212285d9"> 196</a></span> <span class="preprocessor">#define UCX_AVL_FIND_EXACT 0</span></div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span> </div><div class="line"><a name="l00201"></a><span class="lineno"><a class="line" href="avl_8h.html#abd2446d544d5412b6997ee8a17bd368c"> 201</a></span> <span class="preprocessor">#define UCX_AVL_FIND_LOWER_BOUNDED 1</span></div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span> </div><div class="line"><a name="l00206"></a><span class="lineno"><a class="line" href="avl_8h.html#ac74ee7649c1e206b08b31f37dd68ca5e"> 206</a></span> <span class="preprocessor">#define UCX_AVL_FIND_UPPER_BOUNDED 2</span></div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span> </div><div class="line"><a name="l00213"></a><span class="lineno"><a class="line" href="avl_8h.html#af16f24d74fd6af0154de041566c6603b"> 213</a></span> <span class="preprocessor">#define UCX_AVL_FIND_CLOSEST 3</span></div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span> </div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span> <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *<a class="code" href="avl_8h.html#a664986f64d6865605199fbff06e19cd5">ucx_avl_find_node</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>,</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span>  <a class="code" href="ucx_8h.html#a0bc5bf89e556c1d45d10863d52728ac9">distance_func</a> dfnc, <span class="keywordtype">int</span> mode);</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00251"></a><span class="lineno"> 251</span> <span class="keywordtype">void</span> *<a class="code" href="avl_8h.html#a51770e1614b28d7d22dea096c3704f83">ucx_avl_find</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>,</div><div class="line"><a name="l00252"></a><span class="lineno"> 252</span>  <a class="code" href="ucx_8h.html#a0bc5bf89e556c1d45d10863d52728ac9">distance_func</a> dfnc, <span class="keywordtype">int</span> mode);</div><div class="line"><a name="l00253"></a><span class="lineno"> 253</span> </div><div class="line"><a name="l00265"></a><span class="lineno"> 265</span> <span class="keywordtype">int</span> <a class="code" href="avl_8h.html#aec401fab4a24a7edffa734f9baf88577">ucx_avl_put</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>, <span class="keywordtype">void</span> *<a class="code" href="structUcxAVLNode.html#a302501b8c04c3fde668fe72249871258">value</a>);</div><div class="line"><a name="l00266"></a><span class="lineno"> 266</span> </div><div class="line"><a name="l00280"></a><span class="lineno"> 280</span> <span class="keywordtype">int</span> <a class="code" href="avl_8h.html#a32cf8955cc0226a82bacfc7b76d6474c">ucx_avl_put_s</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>, <span class="keywordtype">void</span> *<a class="code" href="structUcxAVLNode.html#a302501b8c04c3fde668fe72249871258">value</a>, <span class="keywordtype">void</span> **oldvalue);</div><div class="line"><a name="l00281"></a><span class="lineno"> 281</span> </div><div class="line"><a name="l00293"></a><span class="lineno"> 293</span> <span class="keywordtype">int</span> <a class="code" href="avl_8h.html#a9a792b7d9e58073deef74a341f8bc720">ucx_avl_remove_node</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a> *node);</div><div class="line"><a name="l00294"></a><span class="lineno"> 294</span> </div><div class="line"><a name="l00302"></a><span class="lineno"> 302</span> <span class="keywordtype">int</span> <a class="code" href="avl_8h.html#a1d821119c805d7fbb7e424bc3effeba9">ucx_avl_remove</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>);</div><div class="line"><a name="l00303"></a><span class="lineno"> 303</span> </div><div class="line"><a name="l00322"></a><span class="lineno"> 322</span> <span class="keywordtype">int</span> <a class="code" href="avl_8h.html#a01aeeecd6415f0cc2b623486eb28f254">ucx_avl_remove_s</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree, intptr_t <a class="code" href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">key</a>,</div><div class="line"><a name="l00323"></a><span class="lineno"> 323</span>  intptr_t *oldkey, <span class="keywordtype">void</span> **oldvalue);</div><div class="line"><a name="l00324"></a><span class="lineno"> 324</span> </div><div class="line"><a name="l00330"></a><span class="lineno"> 330</span> <span class="keywordtype">size_t</span> <a class="code" href="avl_8h.html#a92c1d41c2b22fe4a029a486ab2153e35">ucx_avl_count</a>(<a class="code" href="structUcxAVLTree.html">UcxAVLTree</a> *tree);</div><div class="line"><a name="l00331"></a><span class="lineno"> 331</span> </div><div class="line"><a name="l00338"></a><span class="lineno"> 338</span> <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a>* <a class="code" href="avl_8h.html#a0e739aeb66dda6a6a3f6eb51b50cf346">ucx_avl_pred</a>(<a class="code" href="structUcxAVLNode.html">UcxAVLNode</a>* node);</div><div class="line"><a name="l00339"></a><span class="lineno"> 339</span> </div><div class="line"><a name="l00346"></a><span class="lineno"> 346</span> <a class="code" href="structUcxAVLNode.html">UcxAVLNode</a>* <a class="code" href="avl_8h.html#aab1ad9b027ff5e50671aa0ee84e2d541">ucx_avl_succ</a>(<a class="code" href="structUcxAVLNode.html">UcxAVLNode</a>* node);</div><div class="line"><a name="l00347"></a><span class="lineno"> 347</span> </div><div class="line"><a name="l00348"></a><span class="lineno"> 348</span> <span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00349"></a><span class="lineno"> 349</span> }</div><div class="line"><a name="l00350"></a><span class="lineno"> 350</span> <span class="preprocessor">#endif</span></div><div class="line"><a name="l00351"></a><span class="lineno"> 351</span> </div><div class="line"><a name="l00352"></a><span class="lineno"> 352</span> <span class="preprocessor">#endif </span><span class="comment">/* UCX_AVL_H */</span><span class="preprocessor"></span></div><div class="line"><a name="l00353"></a><span class="lineno"> 353</span> </div><div class="ttc" id="avl_8h_html_a11b043d65a11b7092d5d98b298e5ede3"><div class="ttname"><a href="avl_8h.html#a11b043d65a11b7092d5d98b298e5ede3">ucx_avl_new</a></div><div class="ttdeci">UcxAVLTree * ucx_avl_new(cmp_func cmpfunc)</div><div class="ttdoc">Initializes a new UcxAVLTree with a default allocator. </div><div class="ttdef"><b>Definition:</b> avl.c:109</div></div> | |
72 | <div class="ttc" id="avl_8h_html_a1d821119c805d7fbb7e424bc3effeba9"><div class="ttname"><a href="avl_8h.html#a1d821119c805d7fbb7e424bc3effeba9">ucx_avl_remove</a></div><div class="ttdeci">int ucx_avl_remove(UcxAVLTree *tree, intptr_t key)</div><div class="ttdoc">Removes an element from the AVL tree. </div><div class="ttdef"><b>Definition:</b> avl.c:266</div></div> | |
73 | <div class="ttc" id="structUcxAVLNode_html"><div class="ttname"><a href="structUcxAVLNode.html">UcxAVLNode</a></div><div class="ttdoc">UCX AVL Node. </div><div class="ttdef"><b>Definition:</b> avl.h:63</div></div> | |
74 | <div class="ttc" id="ucx_8h_html_afe5e2d5dbf34778e0e97852051570791"><div class="ttname"><a href="ucx_8h.html#afe5e2d5dbf34778e0e97852051570791">cmp_func</a></div><div class="ttdeci">int(* cmp_func)(const void *, const void *, void *)</div><div class="ttdoc">Function pointer to a compare function. </div><div class="ttdef"><b>Definition:</b> ucx.h:84</div></div> | |
75 | <div class="ttc" id="structUcxAVLNode_html_afc4e3b4f452aa2d91cabb2135b9d42f7"><div class="ttname"><a href="structUcxAVLNode.html#afc4e3b4f452aa2d91cabb2135b9d42f7">UcxAVLNode::parent</a></div><div class="ttdeci">UcxAVLNode * parent</div><div class="ttdoc">Parent node. </div><div class="ttdef"><b>Definition:</b> avl.h:79</div></div> | |
76 | <div class="ttc" id="avl_8h_html_a0e739aeb66dda6a6a3f6eb51b50cf346"><div class="ttname"><a href="avl_8h.html#a0e739aeb66dda6a6a3f6eb51b50cf346">ucx_avl_pred</a></div><div class="ttdeci">UcxAVLNode * ucx_avl_pred(UcxAVLNode *node)</div><div class="ttdoc">Finds the in-order predecessor of the given node. </div><div class="ttdef"><b>Definition:</b> avl.c:335</div></div> | |
77 | <div class="ttc" id="avl_8h_html_aec401fab4a24a7edffa734f9baf88577"><div class="ttname"><a href="avl_8h.html#aec401fab4a24a7edffa734f9baf88577">ucx_avl_put</a></div><div class="ttdeci">int ucx_avl_put(UcxAVLTree *tree, intptr_t key, void *value)</div><div class="ttdoc">Puts a key/value pair into the tree. </div><div class="ttdef"><b>Definition:</b> avl.c:211</div></div> | |
78 | <div class="ttc" id="ucx_8h_html"><div class="ttname"><a href="ucx_8h.html">ucx.h</a></div><div class="ttdoc">Main UCX Header providing most common definitions. </div></div> | |
79 | <div class="ttc" id="structUcxAVLTree_html"><div class="ttname"><a href="structUcxAVLTree.html">UcxAVLTree</a></div><div class="ttdoc">UCX AVL Tree. </div><div class="ttdef"><b>Definition:</b> avl.h:93</div></div> | |
80 | <div class="ttc" id="avl_8h_html_a92c1d41c2b22fe4a029a486ab2153e35"><div class="ttname"><a href="avl_8h.html#a92c1d41c2b22fe4a029a486ab2153e35">ucx_avl_count</a></div><div class="ttdeci">size_t ucx_avl_count(UcxAVLTree *tree)</div><div class="ttdoc">Counts the nodes in the specified UcxAVLTree. </div><div class="ttdef"><b>Definition:</b> avl.c:331</div></div> | |
81 | <div class="ttc" id="avl_8h_html_af0f868d67e9dc08b4867c02a06c23ee2"><div class="ttname"><a href="avl_8h.html#af0f868d67e9dc08b4867c02a06c23ee2">ucx_avl_new_a</a></div><div class="ttdeci">UcxAVLTree * ucx_avl_new_a(cmp_func cmpfunc, UcxAllocator *allocator)</div><div class="ttdoc">Initializes a new UcxAVLTree with the specified allocator. </div><div class="ttdef"><b>Definition:</b> avl.c:113</div></div> | |
82 | <div class="ttc" id="structUcxAVLTree_html_ae92a3bfad3fe33c8dcbdad85112f83fd"><div class="ttname"><a href="structUcxAVLTree.html#ae92a3bfad3fe33c8dcbdad85112f83fd">UcxAVLTree::userdata</a></div><div class="ttdeci">void * userdata</div><div class="ttdoc">Custom user data. </div><div class="ttdef"><b>Definition:</b> avl.h:111</div></div> | |
83 | <div class="ttc" id="avl_8h_html_a9a792b7d9e58073deef74a341f8bc720"><div class="ttname"><a href="avl_8h.html#a9a792b7d9e58073deef74a341f8bc720">ucx_avl_remove_node</a></div><div class="ttdeci">int ucx_avl_remove_node(UcxAVLTree *tree, UcxAVLNode *node)</div><div class="ttdoc">Removes a node from the AVL tree. </div><div class="ttdef"><b>Definition:</b> avl.c:270</div></div> | |
84 | <div class="ttc" id="structUcxAVLTree_html_a87aff25cb726cb9eb88eb815a10d1004"><div class="ttname"><a href="structUcxAVLTree.html#a87aff25cb726cb9eb88eb815a10d1004">UcxAVLTree::cmpfunc</a></div><div class="ttdeci">cmp_func cmpfunc</div><div class="ttdoc">Compare function that shall be used to compare the UcxAVLNode keys. </div><div class="ttdef"><b>Definition:</b> avl.h:106</div></div> | |
85 | <div class="ttc" id="avl_8h_html_aab1ad9b027ff5e50671aa0ee84e2d541"><div class="ttname"><a href="avl_8h.html#aab1ad9b027ff5e50671aa0ee84e2d541">ucx_avl_succ</a></div><div class="ttdeci">UcxAVLNode * ucx_avl_succ(UcxAVLNode *node)</div><div class="ttdoc">Finds the in-order successor of the given node. </div><div class="ttdef"><b>Definition:</b> avl.c:355</div></div> | |
86 | <div class="ttc" id="avl_8h_html_a31ad7fb196ca211f1fc39f4e15f72279"><div class="ttname"><a href="avl_8h.html#a31ad7fb196ca211f1fc39f4e15f72279">ucx_avl_free_content</a></div><div class="ttdeci">void ucx_avl_free_content(UcxAVLTree *tree, ucx_destructor destr)</div><div class="ttdoc">Frees the contents of a UcxAVLTree. </div><div class="ttdef"><b>Definition:</b> avl.c:152</div></div> | |
87 | <div class="ttc" id="structUcxAVLTree_html_a30652776b540156ad54c7d52833e4e28"><div class="ttname"><a href="structUcxAVLTree.html#a30652776b540156ad54c7d52833e4e28">UcxAVLTree::allocator</a></div><div class="ttdeci">UcxAllocator * allocator</div><div class="ttdoc">The UcxAllocator that shall be used to manage the memory for node data. </div><div class="ttdef"><b>Definition:</b> avl.h:97</div></div> | |
88 | <div class="ttc" id="avl_8h_html_a01aeeecd6415f0cc2b623486eb28f254"><div class="ttname"><a href="avl_8h.html#a01aeeecd6415f0cc2b623486eb28f254">ucx_avl_remove_s</a></div><div class="ttdeci">int ucx_avl_remove_s(UcxAVLTree *tree, intptr_t key, intptr_t *oldkey, void **oldvalue)</div><div class="ttdoc">Removes an element from the AVL tree. </div><div class="ttdef"><b>Definition:</b> avl.c:274</div></div> | |
89 | <div class="ttc" id="avl_8h_html_a51770e1614b28d7d22dea096c3704f83"><div class="ttname"><a href="avl_8h.html#a51770e1614b28d7d22dea096c3704f83">ucx_avl_find</a></div><div class="ttdeci">void * ucx_avl_find(UcxAVLTree *tree, intptr_t key, distance_func dfnc, int mode)</div><div class="ttdoc">Finds a value within the tree. </div><div class="ttdef"><b>Definition:</b> avl.c:205</div></div> | |
90 | <div class="ttc" id="structUcxAllocator_html"><div class="ttname"><a href="structUcxAllocator.html">UcxAllocator</a></div><div class="ttdoc">UCX allocator data structure containing memory management functions. </div><div class="ttdef"><b>Definition:</b> allocator.h:88</div></div> | |
91 | <div class="ttc" id="avl_8h_html_a32cf8955cc0226a82bacfc7b76d6474c"><div class="ttname"><a href="avl_8h.html#a32cf8955cc0226a82bacfc7b76d6474c">ucx_avl_put_s</a></div><div class="ttdeci">int ucx_avl_put_s(UcxAVLTree *tree, intptr_t key, void *value, void **oldvalue)</div><div class="ttdoc">Puts a key/value pair into the tree. </div><div class="ttdef"><b>Definition:</b> avl.c:215</div></div> | |
92 | <div class="ttc" id="structUcxAVLTree_html_a393a8fc99eb2c290d3cb67170081d742"><div class="ttname"><a href="structUcxAVLTree.html#a393a8fc99eb2c290d3cb67170081d742">UcxAVLTree::root</a></div><div class="ttdeci">UcxAVLNode * root</div><div class="ttdoc">Root node of the tree. </div><div class="ttdef"><b>Definition:</b> avl.h:101</div></div> | |
93 | <div class="ttc" id="ucx_8h_html_a0bc5bf89e556c1d45d10863d52728ac9"><div class="ttname"><a href="ucx_8h.html#a0bc5bf89e556c1d45d10863d52728ac9">distance_func</a></div><div class="ttdeci">intmax_t(* distance_func)(const void *, const void *, void *)</div><div class="ttdoc">Function pointer to a distance function. </div><div class="ttdef"><b>Definition:</b> ucx.h:93</div></div> | |
94 | <div class="ttc" id="allocator_8h_html"><div class="ttname"><a href="allocator_8h.html">allocator.h</a></div><div class="ttdoc">Allocator for custom memory management. </div></div> | |
95 | <div class="ttc" id="avl_8h_html_adbcf7ceb3f014a30c7214f7304519efe"><div class="ttname"><a href="avl_8h.html#adbcf7ceb3f014a30c7214f7304519efe">ucx_avl_get</a></div><div class="ttdeci">void * ucx_avl_get(UcxAVLTree *tree, intptr_t key)</div><div class="ttdoc">Gets the value from the tree, that is associated with the specified key. </div><div class="ttdef"><b>Definition:</b> avl.c:166</div></div> | |
96 | <div class="ttc" id="structUcxAVLNode_html_ad3a1c733f2c1cc81ac527f846fc24b9c"><div class="ttname"><a href="structUcxAVLNode.html#ad3a1c733f2c1cc81ac527f846fc24b9c">UcxAVLNode::left</a></div><div class="ttdeci">UcxAVLNode * left</div><div class="ttdoc">Root node of left subtree. </div><div class="ttdef"><b>Definition:</b> avl.h:83</div></div> | |
97 | <div class="ttc" id="avl_8h_html_a2f92db538f25fce908d2cb3e5590944c"><div class="ttname"><a href="avl_8h.html#a2f92db538f25fce908d2cb3e5590944c">ucx_avl_free</a></div><div class="ttdeci">void ucx_avl_free(UcxAVLTree *tree)</div><div class="ttdoc">Destroys a UcxAVLTree. </div><div class="ttdef"><b>Definition:</b> avl.c:133</div></div> | |
98 | <div class="ttc" id="structUcxAVLNode_html_a302501b8c04c3fde668fe72249871258"><div class="ttname"><a href="structUcxAVLNode.html#a302501b8c04c3fde668fe72249871258">UcxAVLNode::value</a></div><div class="ttdeci">void * value</div><div class="ttdoc">Data contained by this node. </div><div class="ttdef"><b>Definition:</b> avl.h:71</div></div> | |
99 | <div class="ttc" id="avl_8h_html_a664986f64d6865605199fbff06e19cd5"><div class="ttname"><a href="avl_8h.html#a664986f64d6865605199fbff06e19cd5">ucx_avl_find_node</a></div><div class="ttdeci">UcxAVLNode * ucx_avl_find_node(UcxAVLTree *tree, intptr_t key, distance_func dfnc, int mode)</div><div class="ttdoc">Finds a node within the tree. </div><div class="ttdef"><b>Definition:</b> avl.c:171</div></div> | |
100 | <div class="ttc" id="structUcxAVLNode_html_ab65a31010d26a3df898e6ba534702af6"><div class="ttname"><a href="structUcxAVLNode.html#ab65a31010d26a3df898e6ba534702af6">UcxAVLNode::key</a></div><div class="ttdeci">intptr_t key</div><div class="ttdoc">The key for this node. </div><div class="ttdef"><b>Definition:</b> avl.h:67</div></div> | |
101 | <div class="ttc" id="structUcxAVLNode_html_a7cbaa31dba8c7a89f4f8f7905f6fd238"><div class="ttname"><a href="structUcxAVLNode.html#a7cbaa31dba8c7a89f4f8f7905f6fd238">UcxAVLNode::right</a></div><div class="ttdeci">UcxAVLNode * right</div><div class="ttdoc">Root node of right subtree. </div><div class="ttdef"><b>Definition:</b> avl.h:87</div></div> | |
102 | <div class="ttc" id="avl_8h_html_acf42da9a4168e47dc10b4ba0d27ceb4e"><div class="ttname"><a href="avl_8h.html#acf42da9a4168e47dc10b4ba0d27ceb4e">ucx_avl_get_node</a></div><div class="ttdeci">UcxAVLNode * ucx_avl_get_node(UcxAVLTree *tree, intptr_t key)</div><div class="ttdoc">Gets the node from the tree, that is associated with the specified key. </div><div class="ttdef"><b>Definition:</b> avl.c:156</div></div> | |
103 | <div class="ttc" id="structUcxAVLNode_html_af129fd32863a7c35e82c5cd9d11dc95a"><div class="ttname"><a href="structUcxAVLNode.html#af129fd32863a7c35e82c5cd9d11dc95a">UcxAVLNode::height</a></div><div class="ttdeci">size_t height</div><div class="ttdoc">The height of this (sub)-tree. </div><div class="ttdef"><b>Definition:</b> avl.h:75</div></div> | |
104 | <div class="ttc" id="ucx_8h_html_ad2b370c2809914c8b7fedab163c266b3"><div class="ttname"><a href="ucx_8h.html#ad2b370c2809914c8b7fedab163c266b3">ucx_destructor</a></div><div class="ttdeci">void(* ucx_destructor)(void *)</div><div class="ttdoc">A function pointer to a destructor function. </div><div class="ttdef"><b>Definition:</b> ucx.h:72</div></div> | |
105 | </div><!-- fragment --></div><!-- contents --> | |
106 | <!-- start footer part --> | |
107 | <hr class="footer"/><address class="footer"><small> | |
108 | Generated on Thu Dec 19 2019 19:58:24 for ucx by  <a href="http://www.doxygen.org/index.html"> | |
109 | <img class="footer" src="doxygen.png" alt="doxygen"/> | |
110 | </a> 1.8.13 | |
111 | </small></address> | |
112 | </body> | |
113 | </html> |