blob: 1d05dd2ef4c79970bd5e4fd09d2420b379429107 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://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.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>datasketches-cpp: common/include/kolmogorov_smirnov.hpp 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="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.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">datasketches-cpp
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_bdd9a5d540de89e9fe90efdfc6973a4f.html">common</a></li><li class="navelem"><a class="el" href="dir_11fbc4217d50ab21044e5ad6614aede5.html">include</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle">
<div class="title">kolmogorov_smirnov.hpp</div> </div>
</div><!--header-->
<div class="contents">
<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"> * Licensed to the Apache Software Foundation (ASF) under one</span></div>
<div class="line"><a name="l00003"></a><span class="lineno"> 3</span>&#160;<span class="comment"> * or more contributor license agreements. See the NOTICE file</span></div>
<div class="line"><a name="l00004"></a><span class="lineno"> 4</span>&#160;<span class="comment"> * distributed with this work for additional information</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"> 5</span>&#160;<span class="comment"> * regarding copyright ownership. The ASF licenses this file</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"> 6</span>&#160;<span class="comment"> * to you under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a name="l00007"></a><span class="lineno"> 7</span>&#160;<span class="comment"> * &quot;License&quot;); you may not use this file except in compliance</span></div>
<div class="line"><a name="l00008"></a><span class="lineno"> 8</span>&#160;<span class="comment"> * with the License. You may obtain a copy of the License at</span></div>
<div class="line"><a name="l00009"></a><span class="lineno"> 9</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00010"></a><span class="lineno"> 10</span>&#160;<span class="comment"> * http://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a name="l00011"></a><span class="lineno"> 11</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00012"></a><span class="lineno"> 12</span>&#160;<span class="comment"> * Unless required by applicable law or agreed to in writing,</span></div>
<div class="line"><a name="l00013"></a><span class="lineno"> 13</span>&#160;<span class="comment"> * software distributed under the License is distributed on an</span></div>
<div class="line"><a name="l00014"></a><span class="lineno"> 14</span>&#160;<span class="comment"> * &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY</span></div>
<div class="line"><a name="l00015"></a><span class="lineno"> 15</span>&#160;<span class="comment"> * KIND, either express or implied. See the License for the</span></div>
<div class="line"><a name="l00016"></a><span class="lineno"> 16</span>&#160;<span class="comment"> * specific language governing permissions and limitations</span></div>
<div class="line"><a name="l00017"></a><span class="lineno"> 17</span>&#160;<span class="comment"> * under the License.</span></div>
<div class="line"><a name="l00018"></a><span class="lineno"> 18</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00019"></a><span class="lineno"> 19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"> 20</span>&#160;<span class="preprocessor">#ifndef KOLMOGOROV_SMIRNOV_HPP_</span></div>
<div class="line"><a name="l00021"></a><span class="lineno"> 21</span>&#160;<span class="preprocessor">#define KOLMOGOROV_SMIRNOV_HPP_</span></div>
<div class="line"><a name="l00022"></a><span class="lineno"> 22</span>&#160; </div>
<div class="line"><a name="l00023"></a><span class="lineno"> 23</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacedatasketches.html">datasketches</a> {</div>
<div class="line"><a name="l00024"></a><span class="lineno"> 24</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="classdatasketches_1_1kolmogorov__smirnov.html"> 28</a></span>&#160;<span class="keyword">class </span><a class="code" href="classdatasketches_1_1kolmogorov__smirnov.html">kolmogorov_smirnov</a> {</div>
<div class="line"><a name="l00029"></a><span class="lineno"> 29</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00037"></a><span class="lineno"> 37</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Sketch&gt;</div>
<div class="line"><a name="l00038"></a><span class="lineno"> 38</span>&#160; <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classdatasketches_1_1kolmogorov__smirnov.html#a82e763cc1d3d2411cf94690abe08804d">delta</a>(<span class="keyword">const</span> Sketch&amp; sketch1, <span class="keyword">const</span> Sketch&amp; sketch2);</div>
<div class="line"><a name="l00039"></a><span class="lineno"> 39</span>&#160; </div>
<div class="line"><a name="l00050"></a><span class="lineno"> 50</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Sketch&gt;</div>
<div class="line"><a name="l00051"></a><span class="lineno"> 51</span>&#160; <span class="keyword">static</span> <span class="keywordtype">double</span> <a class="code" href="classdatasketches_1_1kolmogorov__smirnov.html#af92dd2e35bc4c560b837a056797f75af">threshold</a>(<span class="keyword">const</span> Sketch&amp; sketch1, <span class="keyword">const</span> Sketch&amp; sketch2, <span class="keywordtype">double</span> p);</div>
<div class="line"><a name="l00052"></a><span class="lineno"> 52</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno"> 64</span>&#160; <span class="keyword">template</span>&lt;<span class="keyword">typename</span> Sketch&gt;</div>
<div class="line"><a name="l00065"></a><span class="lineno"> 65</span>&#160; <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classdatasketches_1_1kolmogorov__smirnov.html#abe35b8f2ba44099903040c3e9beabd21">test</a>(<span class="keyword">const</span> Sketch&amp; sketch1, <span class="keyword">const</span> Sketch&amp; sketch2, <span class="keywordtype">double</span> p);</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; </div>
<div class="line"><a name="l00068"></a><span class="lineno"> 68</span>&#160;} <span class="comment">/* namespace datasketches */</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"> 69</span>&#160; </div>
<div class="line"><a name="l00070"></a><span class="lineno"> 70</span>&#160;<span class="preprocessor">#include &quot;kolmogorov_smirnov_impl.hpp&quot;</span></div>
<div class="line"><a name="l00071"></a><span class="lineno"> 71</span>&#160; </div>
<div class="line"><a name="l00072"></a><span class="lineno"> 72</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="aclassdatasketches_1_1kolmogorov__smirnov_html"><div class="ttname"><a href="classdatasketches_1_1kolmogorov__smirnov.html">datasketches::kolmogorov_smirnov</a></div><div class="ttdoc">Kolmogorov-Smirnov test for KLL or Quantiles sketches.</div><div class="ttdef"><b>Definition:</b> kolmogorov_smirnov.hpp:28</div></div>
<div class="ttc" id="aclassdatasketches_1_1kolmogorov__smirnov_html_a82e763cc1d3d2411cf94690abe08804d"><div class="ttname"><a href="classdatasketches_1_1kolmogorov__smirnov.html#a82e763cc1d3d2411cf94690abe08804d">datasketches::kolmogorov_smirnov::delta</a></div><div class="ttdeci">static double delta(const Sketch &amp;sketch1, const Sketch &amp;sketch2)</div><div class="ttdoc">Computes the raw delta area between two quantile sketches for the Kolmogorov-Smirnov Test.</div><div class="ttdef"><b>Definition:</b> kolmogorov_smirnov_impl.hpp:29</div></div>
<div class="ttc" id="aclassdatasketches_1_1kolmogorov__smirnov_html_abe35b8f2ba44099903040c3e9beabd21"><div class="ttname"><a href="classdatasketches_1_1kolmogorov__smirnov.html#abe35b8f2ba44099903040c3e9beabd21">datasketches::kolmogorov_smirnov::test</a></div><div class="ttdeci">static bool test(const Sketch &amp;sketch1, const Sketch &amp;sketch2, double p)</div><div class="ttdoc">Performs the Kolmogorov-Smirnov Test between two quantile sketches.</div><div class="ttdef"><b>Definition:</b> kolmogorov_smirnov_impl.hpp:69</div></div>
<div class="ttc" id="aclassdatasketches_1_1kolmogorov__smirnov_html_af92dd2e35bc4c560b837a056797f75af"><div class="ttname"><a href="classdatasketches_1_1kolmogorov__smirnov.html#af92dd2e35bc4c560b837a056797f75af">datasketches::kolmogorov_smirnov::threshold</a></div><div class="ttdeci">static double threshold(const Sketch &amp;sketch1, const Sketch &amp;sketch2, double p)</div><div class="ttdoc">Computes the adjusted delta area threshold for the Kolmogorov-Smirnov Test.</div><div class="ttdef"><b>Definition:</b> kolmogorov_smirnov_impl.hpp:58</div></div>
<div class="ttc" id="anamespacedatasketches_html"><div class="ttname"><a href="namespacedatasketches.html">datasketches</a></div><div class="ttdoc">DataSketches namespace.</div><div class="ttdef"><b>Definition:</b> binomial_bounds.hpp:38</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>