blob: ac28be76d603e1c888bb8c372baf2b72023e55cb [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc -->
<title>QuantilesAPI (datasketches-java 4.0.0 API)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../jquery/jquery-3.6.0.min.js"></script>
<script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="QuantilesAPI (datasketches-java 4.0.0 API)";
}
}
catch(err) {
}
//-->
var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6,"i7":6,"i8":6,"i9":6,"i10":6,"i11":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
var pathtoroot = "../../../../";
var useModuleDirectories = true;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/QuantilesAPI.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding">&nbsp;</div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<!-- ======== START OF CLASS DATA ======== -->
<main role="main">
<div class="header">
<div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">org.apache.datasketches.quantilescommon</a></div>
<h2 title="Interface QuantilesAPI" class="title">Interface QuantilesAPI</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Known Subinterfaces:</dt>
<dd><code><a href="QuantilesDoublesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesDoublesAPI</a></code>, <code><a href="QuantilesFloatsAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesFloatsAPI</a></code>, <code><a href="QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;T&gt;</code></dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><code><a href="../quantiles/CompactDoublesSketch.html" title="class in org.apache.datasketches.quantiles">CompactDoublesSketch</a></code>, <code><a href="../quantiles/DoublesSketch.html" title="class in org.apache.datasketches.quantiles">DoublesSketch</a></code>, <code><a href="../quantiles/ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a></code>, <code><a href="../kll/KllDoublesSketch.html" title="class in org.apache.datasketches.kll">KllDoublesSketch</a></code>, <code><a href="../kll/KllFloatsSketch.html" title="class in org.apache.datasketches.kll">KllFloatsSketch</a></code>, <code><a href="../kll/KllSketch.html" title="class in org.apache.datasketches.kll">KllSketch</a></code>, <code><a href="../req/ReqSketch.html" title="class in org.apache.datasketches.req">ReqSketch</a></code>, <code><a href="../quantiles/UpdateDoublesSketch.html" title="class in org.apache.datasketches.quantiles">UpdateDoublesSketch</a></code></dd>
</dl>
<hr>
<pre>public interface <span class="typeNameLabel">QuantilesAPI</span></pre>
<div class="block"><p>This is a stochastic streaming sketch that enables near-real time analysis of the
approximate distribution of items from a very large stream in a single pass, requiring only
that the items are comparable.
The analysis is obtained using the <i>getQuantile()</i> function or the
inverse functions getRank(), getPMF() (the Probability Mass Function), and getCDF()
(the Cumulative Distribution Function).</p>
<p>Given an input stream of <i>N</i> items, the <i>natural rank</i> of any specific
item is defined as its index <i>(1 to N)</i> in the hypothetical sorted stream of all
<i>N</i> input items.</p>
<p>The <i>normalized rank</i> (<i>rank</i>) of any specific item is defined as its
<i>natural rank</i> divided by <i>N</i>, which is a number in the interval [0.0, 1.0].
In the Javadocs for all the quantile sketches <i>natural rank</i> is seldom used
so any reference to just <i>rank</i> should be interpreted as <i>normalized rank</i>.</p>
<p>Inputs into a quantile sketch are called "items" that can be either generic or specific
primitives, like <i>float</i> or <i>double</i> depending on the sketch implementation.
In order to keep its size small, sketches don't retain all the items offered and retain only
a small fraction of all the items, thus purging most of the items. The items retained are
then sorted and associated with a rank. At this point we call the retained items <i>quantiles</i>.
Thus, all quantiles are items, but only a few items become quantiles. Depending on the context
the two terms can be interchangeable.</p>
<p>All quantile sketches are configured with a parameter <i>k</i>, which affects the size of
the sketch and its estimation error.</p>
<p>In the research literature, the estimation error is commonly called <i>epsilon</i>
(or <i>eps</i>) and is a fraction between zero and one.
Larger sizes of <i>k</i> result in a smaller epsilon, but also a larger sketch.
The epsilon error is always with respect to the rank domain. Estimating the confidence interval
in the quantile domain can be done by first computing the error in the rank domain and then
translating that to the quantile domain. The sketch provides methods to assist with that.</p>
<p>The relationship between the normalized rank and the corresponding quantiles can be viewed
as a two dimensional monotonic plot with the normalized rank on one axis and the
corresponding quantiles on the other axis. Let <i>q := quantile</i> and <i>r := rank</i> then both
<i>q = getQuantile(r)</i> and <i>r = getRank(q)</i> are monotonically increasing functions.
If the y-axis is used for the rank domain and the x-axis for the quantile domain,
then <i>y = getRank(x)</i> is also the single point Cumulative Distribution Function (CDF).</p>
<p>The functions <i>getQuantile()</i> translate ranks into corresponding quantiles.
The functions <i>getRank(), getCDF(), and getPMF() (Probability Mass Function)</i>
perform the opposite operation and translate quantiles into ranks (or cumulative probabilities,
or probability masses, depending on the context).</p>
<p>As an example, consider a large stream of one million items such as packet sizes coming into a network node.
The absolute rank of any specific item size is simply its index in the hypothetical sorted
array of such items.
The normalized rank is the natural rank divided by the stream size, or <i>N</i>,
in this case one million.
The quantile corresponding to the normalized rank of 0.5 represents the 50th percentile or median
of the distribution, obtained from getQuantile(0.5). Similarly, the 95th percentile is obtained from
getQuantile(0.95).</p>
<p>From the min and max quantiles, for example, say 1 and 1000 bytes,
you can obtain the PMF from getPMF(100, 500, 900) that will result in an array of
4 probability masses such as {.4, .3, .2, .1}, which means that
<ul>
<li>40% of the mass was &lt; 100,</li>
<li>30% of the mass was &ge; 100 and &lt; 500,</li>
<li>20% of the mass was &ge; 500 and &lt; 900, and</li>
<li>10% of the mass was &ge; 900.</li>
</ul>
A frequency histogram can be obtained by simply multiplying these probability masses by getN(),
which is the total count of items received.
The <i>getCDF()</i> works similarly, but produces the cumulative distribution instead.
<p>The accuracy of this sketch is a function of the configured <i>k</i>, which also affects
the overall size of the sketch. Accuracy of this quantile sketch is always with respect to
the normalized rank.
<p>The <i>getPMF()</i> function has about 13 to 47% worse rank error (depending
on <i>k</i>) than the other queries because the mass of each "bin" of the PMF has
"double-sided" error from the upper and lower edges of the bin as a result of a subtraction
of random variables where the errors from the two edges can sometimes add.</p>
<p>A <i>getQuantile(rank)</i> query has the following probabilistic guarantees:</p>
<ul>
<li>Let <i>q = getQuantile(r)</i> where <i>r</i> is the rank between zero and one.</li>
<li>The quantile <i>q</i> will be a quantile from the input stream.</li>
<li>Let <i>trueRank</i> be the true rank of <i>q</i> derived from the hypothetical sorted
stream of all <i>N</i> quantiles.</li>
<li>Let <i>eps = getNormalizedRankError(false)</i>[*].</li>
<li>Then <i>r - eps &le; trueRank &le; r + eps</i>.
Note that the error is on the rank, not the quantile.</li>
</ul>
<p>A <i>getRank(quantile)</i> query has the following probabilistic guarantees:</p>
<ul>
<li>Let <i>r = getRank(q)</i> where <i>q</i> is a quantile between the min and max quantiles of
the input stream.</li>
<li>Let <i>trueRank</i> be the true rank of <i>q</i> derived from the hypothetical sorted
stream of all <i>N</i> quantiles.</li>
<li>Let <i>eps = getNormalizedRankError(false)</i>[*].</li>
<li>Then <i>r - eps &le; trueRank &le; r + eps</i>.</li>
</ul>
<p>A <i>getPMF()</i> query has the following probabilistic guarantees:</p>
<ul>
<li>Let <i>{r<sub>1</sub>, r<sub>2</sub>, ..., r<sub>m+1</sub>}
= getPMF(v<sub>1</sub>, v<sub>2</sub>, ..., v<sub>m</sub>)</i> where
<i>q<sub>1</sub>, q<sub>2</sub>, ..., q<sub>m</sub></i> are monotonically increasing quantiles
supplied by the user that are part of the monotonic sequence
<i>q<sub>0</sub> = min, q<sub>1</sub>, q<sub>2</sub>, ..., q<sub>m</sub>, q<sub>m+1</sub> = max</i>,
and where <i>min</i> and <i>max</i> are the actual minimum and maximum quantiles of the input
stream automatically included in the sequence by the <i>getPMF(...)</i> function.
<li>Let <i>r<sub>i</sub> = mass<sub>i</sub></i> = estimated mass between
<i>v<sub>i-1</sub></i> and <i>q<sub>i</sub></i> where <i>q<sub>0</sub> = min</i>
and <i>q<sub>m+1</sub> = max</i>.</li>
<li>Let <i>trueMass</i> be the true mass between the quantiles of <i>q<sub>i</sub>,
q<sub>i+1</sub></i> derived from the hypothetical sorted stream of all <i>N</i> quantiles.</li>
<li>Let <i>eps = getNormalizedRankError(true)</i>[*].</li>
<li>Then <i>mass - eps &le; trueMass &le; mass + eps</i>.</li>
<li><i>r<sub>1</sub></i> includes the mass of all points between <i>min = q<sub>0</sub></i> and
<i>q<sub>1</sub></i>.</li>
<li><i>r<sub>m+1</sub></i> includes the mass of all points between <i>q<sub>m</sub></i> and
<i>max = q<sub>m+1</sub></i>.</li>
</ul>
<p>A <i>getCDF(...)</i> query has the following probabilistic guarantees:</p>
<ul>
<li>Let <i>{r<sub>1</sub>, r<sub>2</sub>, ..., r<sub>m+1</sub>}
= getCDF(q<sub>1</sub>, q<sub>2</sub>, ..., q<sub>m</sub>)</i> where
<i>q<sub>1</sub>, q<sub>2</sub>, ..., q<sub>m</sub>)</i> are monotonically increasing quantiles
supplied by the user that are part of the monotonic sequence
<i>{q<sub>0</sub> = min, q<sub>1</sub>, q<sub>2</sub>, ..., q<sub>m</sub>, q<sub>m+1</sub> = max}</i>,
and where <i>min</i> and <i>max</i> are the actual minimum and maximum quantiles of the input
stream automatically included in the sequence by the <i>getCDF(...)</i> function.
<li>Let <i>r<sub>i</sub> = mass<sub>i</sub></i> = estimated mass between
<i>q<sub>0</sub> = min</i> and <i>q<sub>i</sub></i>.</li>
<li>Let <i>trueMass</i> be the true mass between the true ranks of <i>q<sub>i</sub>,
q<sub>i+1</sub></i> derived from the hypothetical sorted stream of all <i>N</i> quantiles.</li>
<li>Let <i>eps = getNormalizedRankError(true)</i>[*].</li>
<li>then <i>mass - eps &le; trueMass &le; mass + eps</i>.</li>
<li><i>r<sub>1</sub></i> includes the mass of all points between <i>min = q<sub>0</sub></i> and
<i>q<sub>1</sub></i>.</li>
<li><i>r<sub>m+1</sub></i> includes the mass of all points between <i>min = q<sub>0</sub></i> and
<i>max = q<sub>m+1</sub></i>.</li>
</ul>
<p>Because errors are independent, we can make some estimates of the size of the confidence bounds
for the <em>quantile</em> returned from a call to <em>getQuantile()</em>, but not error bounds.
These confidence bounds may be quite large for certain distributions.</p>
<ul>
<li>Let <i>q = getQuantile(r)</i>, the estimated quantile of rank <i>r</i>.</li>
<li>Let <i>eps = getNormalizedRankError(false)</i>[*].</li>
<li>Let <i>q<sub>lo</sub></i> = estimated quantile of rank <i>(r - eps)</i>.</li>
<li>Let <i>q<sub>hi</sub></i> = estimated quantile of rank <i>(r + eps)</i>.</li>
<li>Then <i>q<sub>lo</sub> &le; q &le; q<sub>hi</sub></i>.</li>
</ul>
<p>This sketch is order and distribution insensitive</p>
<p>This algorithm intentionally inserts randomness into the sampling process for items that
ultimately get retained in the sketch. Thus, the results produced by this algorithm are not
deterministic. For example, if the same stream is inserted into two different instances of this
sketch, the answers obtained from the two sketches should be close, but may not be be identical.</p>
<p>Similarly, there may be directional inconsistencies. For example, if a quantile obtained
from getQuantile(rank) is input into the reverse query
getRank(quantile), the resulting rank should be close, but may not exactly equal the original rank.</p>
<p>Please visit our website: <a href="https://datasketches.apache.org">DataSketches Home Page</a>
and specific Javadocs for more information.</p>
<p>[*] Note that obtaining epsilon may require using a similar function but with more parameters
based on the specific sketch implementation.</p></div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lee Rhodes, Kevin Lang, Alexander Saydakov</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="https://datasketches.apache.org/docs/Quantiles/SketchingQuantilesAndRanksTutorial.html">
Sketching Quantiles and Ranks, Tutorial</a>,
<a href="QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colSecond" scope="col">Method</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getK()">getK</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>long</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getN()">getN</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the length of the input stream.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>int</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNumRetained()">getNumRetained</a></span>()</code></th>
<td class="colLast">
<div class="block">Gets the number of quantiles retained by the sketch.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRankLowerBound(double)">getRankLowerBound</a></span>&#8203;(double&nbsp;rank)</code></th>
<td class="colLast">
<div class="block">Gets the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>double</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRankUpperBound(double)">getRankUpperBound</a></span>&#8203;(double&nbsp;rank)</code></th>
<td class="colLast">
<div class="block">Gets the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasMemory()">hasMemory</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if this sketch's data structure is backed by Memory or WritableMemory.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDirect()">isDirect</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if this sketch is empty.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEstimationMode()">isEstimationMode</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if this sketch is in estimation mode.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReadOnly()">isReadOnly</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns true if this sketch is read only.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>void</code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset()">reset</a></span>()</code></th>
<td class="colLast">
<div class="block">Resets this sketch to the empty state.</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td>
<th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th>
<td class="colLast">
<div class="block">Returns a summary of the key parameters of the sketch.</div>
</td>
</tr>
</table>
</li>
</ul>
</section>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<section>
<ul class="blockList">
<li class="blockList"><a id="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a id="getK()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getK</h4>
<pre class="methodSignature">int&nbsp;getK()</pre>
<div class="block">Gets the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</dd>
</dl>
</li>
</ul>
<a id="getN()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getN</h4>
<pre class="methodSignature">long&nbsp;getN()</pre>
<div class="block">Gets the length of the input stream.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the length of the input stream.</dd>
</dl>
</li>
</ul>
<a id="getNumRetained()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumRetained</h4>
<pre class="methodSignature">int&nbsp;getNumRetained()</pre>
<div class="block">Gets the number of quantiles retained by the sketch.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of quantiles retained by the sketch</dd>
</dl>
</li>
</ul>
<a id="getRankLowerBound(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRankLowerBound</h4>
<pre class="methodSignature">double&nbsp;getRankLowerBound&#8203;(double&nbsp;rank)</pre>
<div class="block">Gets the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rank</code> - the given normalized rank.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</dd>
</dl>
</li>
</ul>
<a id="getRankUpperBound(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getRankUpperBound</h4>
<pre class="methodSignature">double&nbsp;getRankUpperBound&#8203;(double&nbsp;rank)</pre>
<div class="block">Gets the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rank</code> - the given normalized rank.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</dd>
</dl>
</li>
</ul>
<a id="hasMemory()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hasMemory</h4>
<pre class="methodSignature">boolean&nbsp;hasMemory()</pre>
<div class="block">Returns true if this sketch's data structure is backed by Memory or WritableMemory.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this sketch's data structure is backed by Memory or WritableMemory.</dd>
</dl>
</li>
</ul>
<a id="isDirect()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDirect</h4>
<pre class="methodSignature">boolean&nbsp;isDirect()</pre>
<div class="block">Returns true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</dd>
</dl>
</li>
</ul>
<a id="isEmpty()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEmpty</h4>
<pre class="methodSignature">boolean&nbsp;isEmpty()</pre>
<div class="block">Returns true if this sketch is empty.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this sketch is empty.</dd>
</dl>
</li>
</ul>
<a id="isEstimationMode()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isEstimationMode</h4>
<pre class="methodSignature">boolean&nbsp;isEstimationMode()</pre>
<div class="block">Returns true if this sketch is in estimation mode.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this sketch is in estimation mode.</dd>
</dl>
</li>
</ul>
<a id="isReadOnly()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isReadOnly</h4>
<pre class="methodSignature">boolean&nbsp;isReadOnly()</pre>
<div class="block">Returns true if this sketch is read only.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if this sketch is read only.</dd>
</dl>
</li>
</ul>
<a id="reset()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reset</h4>
<pre class="methodSignature">void&nbsp;reset()</pre>
<div class="block">Resets this sketch to the empty state.
If the sketch is <i>read only</i> this does nothing.
<p>The parameter <i>k</i> will not change.</p></div>
</li>
</ul>
<a id="toString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>toString</h4>
<pre class="methodSignature"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a>&nbsp;toString()</pre>
<div class="block">Returns a summary of the key parameters of the sketch.</div>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a summary of the key parameters of the sketch.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</section>
</li>
</ul>
</div>
</div>
</main>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/QuantilesAPI.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li>Constr&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</body>
</html>