geos_390_docs/KdTree_8h_source.html

91 lines
36 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>GEOS: KdTree.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GEOS
&#160;<span id="projectnumber">3.9.1dev</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>File&#160;List</span></a></li>
<li><a href="globals.html"><span>File&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_0bc14b2fb119a11b6a0f32f4d350db61.html">geos</a></li><li class="navelem"><a class="el" href="dir_c01eee2f0195f7c921c8a1b68ed5e74c.html">index</a></li><li class="navelem"><a class="el" href="dir_f269aa13b9968baf1e08657a5d472c3c.html">kdtree</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">KdTree.h</div> </div>
</div><!--header-->
<div class="contents">
<a href="KdTree_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>&#160;<span class="comment">/**********************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * GEOS - Geometry Engine Open Source</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * http://geos.osgeo.org</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * Copyright (C) 2020 Paul Ramsey &lt;pramsey@cleverelephant.ca&gt;</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * This is free software; you can redistribute and/or modify it under</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> * the terms of the GNU Lesser General Public Licence as published</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * by the Free Software Foundation.</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> * See the COPYING file for more information.</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> **********************************************************************/</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;</div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="export_8h.html">geos/export.h</a>&gt;</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Envelope_8h.html">geos/geom/Envelope.h</a>&gt;</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="KdNodeVisitor_8h.html">geos/index/kdtree/KdNodeVisitor.h</a>&gt;</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="KdNode_8h.html">geos/index/kdtree/KdNode.h</a>&gt;</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span>&#160;<span class="preprocessor">#include &lt;deque&gt;</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span>&#160;<span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span>&#160;<span class="preprocessor">#pragma warning(push)</span></div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="preprocessor">#pragma warning(disable: 4251) // warning C4251: needs to have dll-interface to be used by clients of class</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span>&#160;</div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacegeos.html">geos</a> {</div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span>&#160;<span class="keyword">namespace </span>index { <span class="comment">// geos::index</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span>&#160;<span class="keyword">namespace </span>kdtree { <span class="comment">// geos::index::kdtree</span></div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html"> 55</a></span>&#160;<span class="keyword">class </span><a class="code" href="export_8h.html#ae36df939090171f6e9a28a8cb6254fea">GEOS_DLL</a> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html">KdTree</a> {</div><div class="line"><a name="l00056"></a><span class="lineno"> 56</span>&#160;</div><div class="line"><a name="l00057"></a><span class="lineno"> 57</span>&#160;<span class="keyword">private</span>:</div><div class="line"><a name="l00058"></a><span class="lineno"> 58</span>&#160;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a27ffc5ac88de8971ef674fe6baea46ba"> 59</a></span>&#160; std::deque&lt;KdNode&gt; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a27ffc5ac88de8971ef674fe6baea46ba">nodeQue</a>;</div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a74c3824891f96fff181cf9ee193107cc"> 60</a></span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a> *<a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a74c3824891f96fff181cf9ee193107cc">root</a>;</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a8f2ebb32e0a7f13b57a2dba5d261da95"> 61</a></span>&#160; <span class="keywordtype">size_t</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a8f2ebb32e0a7f13b57a2dba5d261da95">numberOfNodes</a>;</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a3f2dfb9927b2e47ee00d2d43275fbcc4"> 62</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a3f2dfb9927b2e47ee00d2d43275fbcc4">tolerance</a>;</div><div class="line"><a name="l00063"></a><span class="lineno"> 63</span>&#160;</div><div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* findBestMatchNode(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p);</div><div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* insertExact(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p, <span class="keywordtype">void</span>* data);</div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>&#160;</div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>&#160; <span class="keywordtype">void</span> queryNode(<a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* currentNode, <span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Envelope.html">geom::Envelope</a>&amp; queryEnv, <span class="keywordtype">bool</span> odd, <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor.html">KdNodeVisitor</a>&amp; visitor);</div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* queryNodePoint(<a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* currentNode, <span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; queryPt, <span class="keywordtype">bool</span> odd);</div><div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160;</div><div class="line"><a name="l00074"></a><span class="lineno"> 74</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* createNode(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p, <span class="keywordtype">void</span>* data);</div><div class="line"><a name="l00075"></a><span class="lineno"> 75</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"> 76</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html"> 81</a></span>&#160; <span class="keyword">class </span><a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a> : <span class="keyword">public</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor.html">KdNodeVisitor</a> {</div><div class="line"><a name="l00082"></a><span class="lineno"> 82</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00083"></a><span class="lineno"> 83</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a>(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p_p, <span class="keywordtype">double</span> p_tolerance);</div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span>&#160; <a class="code" href="classgeos_1_1geom_1_1Envelope.html">geom::Envelope</a> queryEnvelope();</div><div class="line"><a name="l00085"></a><span class="lineno"> 85</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* getNode();</div><div class="line"><a name="l00086"></a><span class="lineno"> 86</span>&#160; <span class="keywordtype">void</span> visit(<a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* node) <span class="keyword">override</span>;</div><div class="line"><a name="l00087"></a><span class="lineno"> 87</span>&#160;</div><div class="line"><a name="l00088"></a><span class="lineno"> 88</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00089"></a><span class="lineno"> 89</span>&#160; <span class="comment">// Members</span></div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#ab9112cfadbfa567aaa169c3fcca2c5f7"> 90</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#ab9112cfadbfa567aaa169c3fcca2c5f7">tolerance</a>;</div><div class="line"><a name="l00091"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a767967724bf90eb7526eca9d039888fd"> 91</a></span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a767967724bf90eb7526eca9d039888fd">matchNode</a>;</div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#abb99ab4101696d88fc63b7a27e89e242"> 92</a></span>&#160; <span class="keywordtype">double</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#abb99ab4101696d88fc63b7a27e89e242">matchDist</a>;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a1e6792ae329a9485e976a328e555cd5c"> 93</a></span>&#160; <span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a1e6792ae329a9485e976a328e555cd5c">p</a>;</div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>&#160; <span class="comment">// Declare type as noncopyable</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a>(<span class="keyword">const</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a>&amp; other);</div><div class="line"><a name="l00096"></a><span class="lineno"> 96</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">BestMatchVisitor</a>&amp; rhs);</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>&#160; };</div><div class="line"><a name="l00098"></a><span class="lineno"> 98</span>&#160;</div><div class="line"><a name="l00103"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html"> 103</a></span>&#160; <span class="keyword">class </span><a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">AccumulatingVisitor</a> : <span class="keyword">public</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor.html">KdNodeVisitor</a> {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#aadd8852c6ff0e49268ed0fd54163aeee"> 105</a></span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#aadd8852c6ff0e49268ed0fd54163aeee">AccumulatingVisitor</a>(std::vector&lt;KdNode*&gt;&amp; p_nodeList) :</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>&#160; nodeList(p_nodeList) {};</div><div class="line"><a name="l00107"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a881c36cfac5619a38dcdb74d97794c1d"> 107</a></span>&#160; <span class="keywordtype">void</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a881c36cfac5619a38dcdb74d97794c1d">visit</a>(<a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* node)<span class="keyword"> override </span>{ nodeList.push_back(node); }</div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>&#160;</div><div class="line"><a name="l00109"></a><span class="lineno"> 109</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span>&#160; <span class="comment">// Members</span></div><div class="line"><a name="l00111"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a5293d76ff8655434ca060b69dd99d4bc"> 111</a></span>&#160; std::vector&lt;KdNode*&gt;&amp; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a5293d76ff8655434ca060b69dd99d4bc">nodeList</a>;</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span>&#160; <span class="comment">// Declare type as noncopyable</span></div><div class="line"><a name="l00113"></a><span class="lineno"> 113</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">AccumulatingVisitor</a>(<span class="keyword">const</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">AccumulatingVisitor</a>&amp; other);</div><div class="line"><a name="l00114"></a><span class="lineno"> 114</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">AccumulatingVisitor</a>&amp; operator=(<span class="keyword">const</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">AccumulatingVisitor</a>&amp; rhs);</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>&#160; };</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>&#160;</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>&#160;</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>&#160; <span class="keyword">static</span> std::unique_ptr&lt;std::vector&lt;geom::Coordinate&gt;&gt; toCoordinates(std::vector&lt;KdNode*&gt;&amp; kdnodes);</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>&#160; <span class="keyword">static</span> std::unique_ptr&lt;std::vector&lt;geom::Coordinate&gt;&gt; toCoordinates(std::vector&lt;KdNode*&gt;&amp; kdnodes, <span class="keywordtype">bool</span> includeRepeated);</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>&#160;</div><div class="line"><a name="l00142"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a813c96abffdc67bf8453ae6e0910ef93"> 142</a></span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a813c96abffdc67bf8453ae6e0910ef93">KdTree</a>() :</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>&#160; root(nullptr),</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>&#160; numberOfNodes(0),</div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>&#160; tolerance(0.0)</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>&#160; {};</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a561b234a719b39132d32b6c64a49d578"> 148</a></span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a561b234a719b39132d32b6c64a49d578">KdTree</a>(<span class="keywordtype">double</span> p_tolerance) :</div><div class="line"><a name="l00149"></a><span class="lineno"> 149</span>&#160; root(nullptr),</div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span>&#160; numberOfNodes(0),</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>&#160; tolerance(p_tolerance)</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>&#160; {};</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno"><a class="line" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a470a7525a3aad237b49ccc540d0dce0b"> 154</a></span>&#160; <span class="keywordtype">bool</span> <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a470a7525a3aad237b49ccc540d0dce0b">isEmpty</a>() { <span class="keywordflow">return</span> root == <span class="keyword">nullptr</span>; }</div><div class="line"><a name="l00155"></a><span class="lineno"> 155</span>&#160;</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* insert(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p);</div><div class="line"><a name="l00160"></a><span class="lineno"> 160</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* insert(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; p, <span class="keywordtype">void</span>* data);</div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>&#160; <span class="keywordtype">void</span> query(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Envelope.html">geom::Envelope</a>&amp; queryEnv, <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor.html">KdNodeVisitor</a>&amp; visitor);</div><div class="line"><a name="l00166"></a><span class="lineno"> 166</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>&#160; std::unique_ptr&lt;std::vector&lt;KdNode*&gt;&gt; query(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Envelope.html">geom::Envelope</a>&amp; queryEnv);</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>&#160;</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>&#160; <span class="keywordtype">void</span> query(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Envelope.html">geom::Envelope</a>&amp; queryEnv, std::vector&lt;KdNode*&gt;&amp; result);</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>&#160;</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>&#160; <a class="code" href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">KdNode</a>* query(<span class="keyword">const</span> <a class="code" href="classgeos_1_1geom_1_1Coordinate.html">geom::Coordinate</a>&amp; queryPt);</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>&#160;};</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>&#160;} <span class="comment">// namespace geos::index::kdtree</span></div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>&#160;} <span class="comment">// namespace geos::index</span></div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>&#160;} <span class="comment">// namespace geos</span></div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>&#160;</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>&#160;<span class="preprocessor">#ifdef _MSC_VER</span></div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>&#160;<span class="preprocessor">#pragma warning(pop)</span></div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>&#160;</div><div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor_html_a1e6792ae329a9485e976a328e555cd5c"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a1e6792ae329a9485e976a328e555cd5c">geos::index::kdtree::KdTree::BestMatchVisitor::p</a></div><div class="ttdeci">const geom::Coordinate &amp; p</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00093">KdTree.h:93</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a470a7525a3aad237b49ccc540d0dce0b"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a470a7525a3aad237b49ccc540d0dce0b">geos::index::kdtree::KdTree::isEmpty</a></div><div class="ttdeci">bool isEmpty()</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00154">KdTree.h:154</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a813c96abffdc67bf8453ae6e0910ef93"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a813c96abffdc67bf8453ae6e0910ef93">geos::index::kdtree::KdTree::KdTree</a></div><div class="ttdeci">KdTree()</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00142">KdTree.h:142</a></div></div>
<div class="ttc" id="classgeos_1_1geom_1_1Envelope_html"><div class="ttname"><a href="classgeos_1_1geom_1_1Envelope.html">geos::geom::Envelope</a></div><div class="ttdoc">An Envelope defines a rectangulare region of the 2D coordinate plane. </div><div class="ttdef"><b>Definition:</b> <a href="Envelope_8h_source.html#l00058">Envelope.h:58</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor_html_a881c36cfac5619a38dcdb74d97794c1d"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a881c36cfac5619a38dcdb74d97794c1d">geos::index::kdtree::KdTree::AccumulatingVisitor::visit</a></div><div class="ttdeci">void visit(KdNode *node) override</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00107">KdTree.h:107</a></div></div>
<div class="ttc" id="export_8h_html_ae36df939090171f6e9a28a8cb6254fea"><div class="ttname"><a href="export_8h.html#ae36df939090171f6e9a28a8cb6254fea">GEOS_DLL</a></div><div class="ttdeci">#define GEOS_DLL</div><div class="ttdef"><b>Definition:</b> <a href="export_8h_source.html#l00028">export.h:28</a></div></div>
<div class="ttc" id="classgeos_1_1geom_1_1Coordinate_html"><div class="ttname"><a href="classgeos_1_1geom_1_1Coordinate.html">geos::geom::Coordinate</a></div><div class="ttdoc">Coordinate is the lightweight class used to store coordinates. </div><div class="ttdef"><b>Definition:</b> <a href="Coordinate_8h_source.html#l00060">Coordinate.h:60</a></div></div>
<div class="ttc" id="export_8h_html"><div class="ttname"><a href="export_8h.html">export.h</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor_html"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html">geos::index::kdtree::KdTree::AccumulatingVisitor</a></div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00103">KdTree.h:103</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor_html"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html">geos::index::kdtree::KdTree::BestMatchVisitor</a></div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00081">KdTree.h:81</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a74c3824891f96fff181cf9ee193107cc"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a74c3824891f96fff181cf9ee193107cc">geos::index::kdtree::KdTree::root</a></div><div class="ttdeci">KdNode * root</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00060">KdTree.h:60</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a27ffc5ac88de8971ef674fe6baea46ba"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a27ffc5ac88de8971ef674fe6baea46ba">geos::index::kdtree::KdTree::nodeQue</a></div><div class="ttdeci">std::deque&lt; KdNode &gt; nodeQue</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00059">KdTree.h:59</a></div></div>
<div class="ttc" id="KdNodeVisitor_8h_html"><div class="ttname"><a href="KdNodeVisitor_8h.html">KdNodeVisitor.h</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a561b234a719b39132d32b6c64a49d578"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a561b234a719b39132d32b6c64a49d578">geos::index::kdtree::KdTree::KdTree</a></div><div class="ttdeci">KdTree(double p_tolerance)</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00148">KdTree.h:148</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a3f2dfb9927b2e47ee00d2d43275fbcc4"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a3f2dfb9927b2e47ee00d2d43275fbcc4">geos::index::kdtree::KdTree::tolerance</a></div><div class="ttdeci">double tolerance</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00062">KdTree.h:62</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html">geos::index::kdtree::KdTree</a></div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00055">KdTree.h:55</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_html_a8f2ebb32e0a7f13b57a2dba5d261da95"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree.html#a8f2ebb32e0a7f13b57a2dba5d261da95">geos::index::kdtree::KdTree::numberOfNodes</a></div><div class="ttdeci">size_t numberOfNodes</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00061">KdTree.h:61</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor_html_a5293d76ff8655434ca060b69dd99d4bc"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#a5293d76ff8655434ca060b69dd99d4bc">geos::index::kdtree::KdTree::AccumulatingVisitor::nodeList</a></div><div class="ttdeci">std::vector&lt; KdNode * &gt; &amp; nodeList</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00111">KdTree.h:111</a></div></div>
<div class="ttc" id="namespacegeos_html"><div class="ttname"><a href="namespacegeos.html">geos</a></div><div class="ttdoc">Basic namespace for all GEOS functionalities. </div><div class="ttdef"><b>Definition:</b> <a href="IndexedNestedRingTester_8h_source.html#l00026">IndexedNestedRingTester.h:26</a></div></div>
<div class="ttc" id="Envelope_8h_html"><div class="ttname"><a href="Envelope_8h.html">Envelope.h</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor_html_ab9112cfadbfa567aaa169c3fcca2c5f7"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#ab9112cfadbfa567aaa169c3fcca2c5f7">geos::index::kdtree::KdTree::BestMatchVisitor::tolerance</a></div><div class="ttdeci">double tolerance</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00090">KdTree.h:90</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor_html_abb99ab4101696d88fc63b7a27e89e242"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#abb99ab4101696d88fc63b7a27e89e242">geos::index::kdtree::KdTree::BestMatchVisitor::matchDist</a></div><div class="ttdeci">double matchDist</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00092">KdTree.h:92</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdNode_html"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdNode.html">geos::index::kdtree::KdNode</a></div><div class="ttdef"><b>Definition:</b> <a href="KdNode_8h_source.html#l00030">KdNode.h:30</a></div></div>
<div class="ttc" id="KdNode_8h_html"><div class="ttname"><a href="KdNode_8h.html">KdNode.h</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor_html_a767967724bf90eb7526eca9d039888fd"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1BestMatchVisitor.html#a767967724bf90eb7526eca9d039888fd">geos::index::kdtree::KdTree::BestMatchVisitor::matchNode</a></div><div class="ttdeci">KdNode * matchNode</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00091">KdTree.h:91</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor_html"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdNodeVisitor.html">geos::index::kdtree::KdNodeVisitor</a></div><div class="ttdef"><b>Definition:</b> <a href="KdNodeVisitor_8h_source.html#l00027">KdNodeVisitor.h:27</a></div></div>
<div class="ttc" id="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor_html_aadd8852c6ff0e49268ed0fd54163aeee"><div class="ttname"><a href="classgeos_1_1index_1_1kdtree_1_1KdTree_1_1AccumulatingVisitor.html#aadd8852c6ff0e49268ed0fd54163aeee">geos::index::kdtree::KdTree::AccumulatingVisitor::AccumulatingVisitor</a></div><div class="ttdeci">AccumulatingVisitor(std::vector&lt; KdNode * &gt; &amp;p_nodeList)</div><div class="ttdef"><b>Definition:</b> <a href="KdTree_8h_source.html#l00105">KdTree.h:105</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>