blob: 71e471964240048e77647b3ea0224f29276c90bc [file]
<!DOCTYPE HTML>
<html lang>
<head>
<!-- Generated by javadoc (25) -->
<title>QuantilesItemsSketch (datasketches-java 9.0.1-SNAPSHOT API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.datasketches.quantiles, class: QuantilesItemsSketch">
<meta name="generator" content="javadoc/ClassWriter">
<link rel="stylesheet" type="text/css" href="../../../../resource-files/jquery-ui.min.css">
<link rel="stylesheet" type="text/css" href="../../../../resource-files/stylesheet.css">
<script type="text/javascript" src="../../../../script-files/script.js"></script>
<script type="text/javascript" src="../../../../script-files/jquery-3.7.1.min.js"></script>
<script type="text/javascript" src="../../../../script-files/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">const pathtoroot = "../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="nav-content">
<div class="nav-menu-button"><button id="navbar-toggle-button" aria-controls="navbar-top" aria-expanded="false" aria-label="Toggle navigation links"><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span><span class="nav-bar-toggle-icon">&nbsp;</span></button></div>
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../index.html">Overview</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/QuantilesItemsSketch.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="../../../../search.html">Search</a></li>
<li><a href="../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
</div>
<div class="sub-nav">
<div class="nav-content">
<ol class="sub-nav-list">
<li><a href="package-summary.html">org.apache.datasketches.quantiles</a></li>
<li><a href="QuantilesItemsSketch.html" class="current-selection">QuantilesItemsSketch</a></li>
</ol>
<div class="nav-list-search"><input type="text" id="search-input" disabled placeholder="Search documentation (type /)" aria-label="Search in documentation" autocomplete="off" spellcheck="false"><input type="reset" id="reset-search" disabled value="Reset"></div>
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="main-grid">
<nav role="navigation" class="toc" aria-label="Table of contents">
<div class="toc-header">Contents&nbsp;<input type="text" class="filter-input" disabled placeholder="Filter contents (type .)" aria-label="Filter table of contents" autocomplete="off" spellcheck="false"><input type="reset" class="reset-filter" disabled tabindex="-1" value="Reset"></div>
<ol class="toc-list" tabindex="-1">
<li><a href="#" tabindex="0">Description</a></li>
<li><a href="#field-summary" tabindex="0">Field Summary</a></li>
<li><a href="#method-summary" tabindex="0">Method Summary</a></li>
<li><a href="#field-detail" tabindex="0">Field Details</a>
<ol class="toc-list">
<li><a href="#rand" tabindex="0">rand</a></li>
</ol>
</li>
<li><a href="#method-detail" tabindex="0">Method Details</a>
<ol class="toc-list">
<li><a href="#getInstance(java.lang.Class,java.util.Comparator)" tabindex="0">getInstance(Class, Comparator)</a></li>
<li><a href="#getInstance(java.lang.Class,int,java.util.Comparator)" tabindex="0">getInstance(Class, int, Comparator)</a></li>
<li><a href="#heapify(java.lang.Class,java.lang.foreign.MemorySegment,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)" tabindex="0">heapify(Class, MemorySegment, Comparator, ArrayOfItemsSerDe)</a></li>
<li><a href="#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getCDF(T[], QuantileSearchCriteria)</a></li>
<li><a href="#getClassOfT()" tabindex="0">getClassOfT()</a></li>
<li><a href="#getComparator()" tabindex="0">getComparator()</a></li>
<li><a href="#getMaxItem()" tabindex="0">getMaxItem()</a></li>
<li><a href="#getMinItem()" tabindex="0">getMinItem()</a></li>
<li><a href="#getPartitionBoundariesFromNumParts(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getPartitionBoundariesFromNumParts(int, QuantileSearchCriteria)</a></li>
<li><a href="#getPartitionBoundariesFromPartSize(long,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getPartitionBoundariesFromPartSize(long, QuantileSearchCriteria)</a></li>
<li><a href="#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getPMF(T[], QuantileSearchCriteria)</a></li>
<li><a href="#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getQuantile(double, QuantileSearchCriteria)</a></li>
<li><a href="#getQuantileLowerBound(double)" tabindex="0">getQuantileLowerBound(double)</a></li>
<li><a href="#getQuantileUpperBound(double)" tabindex="0">getQuantileUpperBound(double)</a></li>
<li><a href="#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getQuantiles(double[], QuantileSearchCriteria)</a></li>
<li><a href="#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getRank(T, QuantileSearchCriteria)</a></li>
<li><a href="#getRankLowerBound(double)" tabindex="0">getRankLowerBound(double)</a></li>
<li><a href="#getRankUpperBound(double)" tabindex="0">getRankUpperBound(double)</a></li>
<li><a href="#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" tabindex="0">getRanks(T[], QuantileSearchCriteria)</a></li>
<li><a href="#iterator()" tabindex="0">iterator()</a></li>
<li><a href="#getK()" tabindex="0">getK()</a></li>
<li><a href="#getN()" tabindex="0">getN()</a></li>
<li><a href="#getNormalizedRankError(boolean)" tabindex="0">getNormalizedRankError(boolean)</a></li>
<li><a href="#getNormalizedRankError(int,boolean)" tabindex="0">getNormalizedRankError(int, boolean)</a></li>
<li><a href="#getKFromEpsilon(double,boolean)" tabindex="0">getKFromEpsilon(double, boolean)</a></li>
<li><a href="#isEmpty()" tabindex="0">isEmpty()</a></li>
<li><a href="#isEstimationMode()" tabindex="0">isEstimationMode()</a></li>
<li><a href="#isReadOnly()" tabindex="0">isReadOnly()</a></li>
<li><a href="#reset()" tabindex="0">reset()</a></li>
<li><a href="#toByteArray(org.apache.datasketches.common.ArrayOfItemsSerDe)" tabindex="0">toByteArray(ArrayOfItemsSerDe)</a></li>
<li><a href="#toByteArray(boolean,org.apache.datasketches.common.ArrayOfItemsSerDe)" tabindex="0">toByteArray(boolean, ArrayOfItemsSerDe)</a></li>
<li><a href="#toString()" tabindex="0">toString()</a></li>
<li><a href="#toString(boolean,boolean)" tabindex="0">toString(boolean, boolean)</a></li>
<li><a href="#toString(byte%5B%5D)" tabindex="0">toString(byte[])</a></li>
<li><a href="#toString(java.lang.foreign.MemorySegment)" tabindex="0">toString(MemorySegment)</a></li>
<li><a href="#downSample(int)" tabindex="0">downSample(int)</a></li>
<li><a href="#getNumRetained()" tabindex="0">getNumRetained()</a></li>
<li><a href="#putIntoMemorySegment(java.lang.foreign.MemorySegment,org.apache.datasketches.common.ArrayOfItemsSerDe)" tabindex="0">putIntoMemorySegment(MemorySegment, ArrayOfItemsSerDe)</a></li>
<li><a href="#update(T)" tabindex="0">update(T)</a></li>
<li><a href="#getSortedView()" tabindex="0">getSortedView()</a></li>
</ol>
</li>
</ol>
<button class="hide-sidebar"><span>Hide sidebar&nbsp;</span><img src="../../../../resource-files/left.svg" alt="Hide sidebar"></button><button class="show-sidebar"><img src="../../../../resource-files/right.svg" alt="Show sidebar"><span>&nbsp;Show sidebar</span></button></nav>
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<h1 title="Class QuantilesItemsSketch" class="title">Class QuantilesItemsSketch&lt;T&gt;</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance">org.apache.datasketches.quantiles.QuantilesItemsSketch&lt;T&gt;</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><span id="type-param-T"><code>T</code> - The sketch item data type.</span></dd>
</dl>
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="../quantilescommon/PartitioningFeature.html" title="interface in org.apache.datasketches.quantilescommon">PartitioningFeature</a>&lt;T&gt;, <a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a>, <a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;T&gt;, <a href="../quantilescommon/SketchPartitionLimits.html" title="interface in org.apache.datasketches.quantilescommon">SketchPartitionLimits</a></code></dd>
</dl>
<hr>
<div class="horizontal-scroll">
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">QuantilesItemsSketch&lt;T&gt;</span>
<span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a>
implements <a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;T&gt;</span></div>
<div class="block">This is an implementation of the Low Discrepancy Mergeable Quantiles Sketch, using generic items,
described in section 3.2 of the journal version of the paper "Mergeable Summaries"
by Agarwal, Cormode, Huang, Phillips, Wei, and Yi:
<p>Reference: <a href="http://dblp.org/rec/html/journals/tods/AgarwalCHPWY13"></a></p>
<p>A <i>k</i> of 128 produces a normalized, rank error of about 1.7%.
For example, the median returned from getQuantile(0.5) will be between the actual quantiles
from the hypothetically sorted array of input quantiles at normalized ranks of 0.483 and 0.517, with
a confidence of about 99%.</p>
<p>The size of an QuantilesItemsSketch is very dependent on the size of the generic Items input into the sketch,
so there is no comparable size table as there is for the QuantilesDoublesSketch.</p></div>
<dl class="notes">
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon"><code>QuantilesAPI</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static final <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Random.html" title="class or interface in java.util" class="external-link">Random</a></code></div>
<div class="col-second even-row-color"><code><a href="#rand" class="member-name-link">rand</a></code></div>
<div class="col-last even-row-color">
<div class="block">Setting the seed makes the results of the sketch deterministic if the input items are
received in exactly the same order.</div>
</div>
</div>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.datasketches.quantilescommon.QuantilesAPI">Fields inherited from interface&nbsp;<a href="../quantilescommon/QuantilesAPI.html#field-summary" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></h3>
<code><a href="../quantilescommon/QuantilesAPI.html#EMPTY_MSG">EMPTY_MSG</a>, <a href="../quantilescommon/QuantilesAPI.html#MEM_REQ_SVR_NULL_MSG">MEM_REQ_SVR_NULL_MSG</a>, <a href="../quantilescommon/QuantilesAPI.html#NOT_SINGLE_ITEM_MSG">NOT_SINGLE_ITEM_MSG</a>, <a href="../quantilescommon/QuantilesAPI.html#SELF_MERGE_MSG">SELF_MERGE_MSG</a>, <a href="../quantilescommon/QuantilesAPI.html#TGT_IS_READ_ONLY_MSG">TGT_IS_READ_ONLY_MSG</a>, <a href="../quantilescommon/QuantilesAPI.html#UNSUPPORTED_MSG">UNSUPPORTED_MSG</a></code></div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel" aria-labelledby="method-summary-table-tab0">
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#downSample(int)" class="member-name-link">downSample</a><wbr>(int&nbsp;newK)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">From an existing sketch, this creates a new sketch that can have a smaller K.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getCDF</a><wbr>(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;splitPoints,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns an approximation to the Cumulative Distribution Function (CDF) of the input stream
as a monotonically increasing array of double ranks (or cumulative probabilities) on the interval [0.0, 1.0],
given a set of splitPoints.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getClassOfT()" class="member-name-link">getClassOfT</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the sketch item class</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a><wbr>&lt;? super <a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getComparator()" class="member-name-link">getComparator</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the Comparator of T</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a><wbr>&lt;T&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance(java.lang.Class,int,java.util.Comparator)" class="member-name-link">getInstance</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
int&nbsp;k,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Obtains a new instance of an QuantilesItemsSketch using the given <i>k</i>.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a><wbr>&lt;T&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getInstance(java.lang.Class,java.util.Comparator)" class="member-name-link">getInstance</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Obtains a new instance of an QuantilesItemsSketch using the DEFAULT_K.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getK()" class="member-name-link">getK</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getKFromEpsilon(double,boolean)" class="member-name-link">getKFromEpsilon</a><wbr>(double&nbsp;epsilon,
boolean&nbsp;pmf)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Gets the approximate <em>k</em> to use given epsilon, the normalized rank error.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxItem()" class="member-name-link">getMaxItem</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the maximum item of the stream.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinItem()" class="member-name-link">getMinItem</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns the minimum item of the stream.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>long</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getN()" class="member-name-link">getN</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the length of the input stream offered to the sketch..</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNormalizedRankError(boolean)" class="member-name-link">getNormalizedRankError</a><wbr>(boolean&nbsp;pmf)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the approximate rank error of this sketch normalized as a fraction between zero and one.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#getNormalizedRankError(int,boolean)" class="member-name-link">getNormalizedRankError</a><wbr>(int&nbsp;k,
boolean&nbsp;pmf)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Gets the normalized rank error given k and pmf.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getNumRetained()" class="member-name-link">getNumRetained</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the number of quantiles retained by the sketch.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">GenericPartitionBoundaries</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPartitionBoundariesFromNumParts(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getPartitionBoundariesFromNumParts</a><wbr>(int&nbsp;numEquallySizedParts,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">This method returns an instance of
<a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a> which provides
sufficient information for the user to create the given number of equally sized partitions, where "equally sized"
refers to an approximately equal number of items per partition.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">GenericPartitionBoundaries</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPartitionBoundariesFromPartSize(long,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getPartitionBoundariesFromPartSize</a><wbr>(long&nbsp;nominalPartSizeItems,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">This method returns an instance of
<a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a> which provides
sufficient information for the user to create the given number of equally sized partitions, where "equally sized"
refers to an approximately equal number of items per partition.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getPMF</a><wbr>(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;splitPoints,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns an approximation to the Probability Mass Function (PMF) of the input stream
as an array of probability masses as doubles on the interval [0.0, 1.0],
given a set of splitPoints.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getQuantile</a><wbr>(double&nbsp;rank,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the approximate quantile of the given normalized rank and the given search criterion.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getQuantileLowerBound(double)" class="member-name-link">getQuantileLowerBound</a><wbr>(double&nbsp;rank)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the lower bound of the quantile confidence interval in which the quantile of the
given rank exists.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getQuantiles</a><wbr>(double[]&nbsp;ranks,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets an array of quantiles from the given array of normalized ranks.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getQuantileUpperBound(double)" class="member-name-link">getQuantileUpperBound</a><wbr>(double&nbsp;rank)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the upper bound of the quantile confidence interval in which the true quantile of the
given rank exists.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getRank</a><wbr>(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&nbsp;quantile,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the normalized rank corresponding to the given a quantile.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRankLowerBound(double)" class="member-name-link">getRankLowerBound</a><wbr>(double&nbsp;rank)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)" class="member-name-link">getRanks</a><wbr>(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;quantiles,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets an array of normalized ranks corresponding to the given array of quantiles and the given
search criterion.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>double</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getRankUpperBound(double)" class="member-name-link">getRankUpperBound</a><wbr>(double&nbsp;rank)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../quantilescommon/ItemsSketchSortedView.html" title="class in org.apache.datasketches.quantilescommon">ItemsSketchSortedView</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getSortedView()" class="member-name-link">getSortedView</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the sorted view of this sketch</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static &lt;T&gt;&nbsp;<a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a><wbr>&lt;T&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#heapify(java.lang.Class,java.lang.foreign.MemorySegment,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)" class="member-name-link">heapify</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;srcSeg,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;T&gt;&nbsp;serDe)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Heapifies the given srcSeg, which must be a MemorySegment image of a QuantilesItemsSketch.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isEmpty()" class="member-name-link">isEmpty</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if this sketch is empty.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isEstimationMode()" class="member-name-link">isEstimationMode</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if this sketch is in estimation mode.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isReadOnly()" class="member-name-link">isReadOnly</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns true if this sketch is read only.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="../quantilescommon/QuantilesGenericSketchIteratorAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericSketchIteratorAPI</a><wbr>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#iterator()" class="member-name-link">iterator</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Gets the iterator for this sketch, which is not sorted.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#putIntoMemorySegment(java.lang.foreign.MemorySegment,org.apache.datasketches.common.ArrayOfItemsSerDe)" class="member-name-link">putIntoMemorySegment</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;dstSeg,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Puts the current sketch into the given MemorySegment if there is sufficient space.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#reset()" class="member-name-link">reset</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Resets this sketch to the empty state.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte[]</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toByteArray(boolean,org.apache.datasketches.common.ArrayOfItemsSerDe)" class="member-name-link">toByteArray</a><wbr>(boolean&nbsp;ordered,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Serialize this sketch to a byte array form.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>byte[]</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toByteArray(org.apache.datasketches.common.ArrayOfItemsSerDe)" class="member-name-link">toByteArray</a><wbr>(<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Serialize this sketch to a byte array form.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns human readable summary information about this sketch.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString(boolean,boolean)" class="member-name-link">toString</a><wbr>(boolean&nbsp;withLevels,
boolean&nbsp;withLevelsAndItems)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Returns human readable summary information about this sketch.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toString(byte%5B%5D)" class="member-name-link">toString</a><wbr>(byte[]&nbsp;byteArr)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a human readable string of the preamble of a byte array image of an QuantilesItemsSketch.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#toString(java.lang.foreign.MemorySegment)" class="member-name-link">toString</a><wbr>(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;seg)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">
<div class="block">Returns a human readable string of the preamble of a MemorySegment image of an QuantilesItemsSketch.</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>void</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#update(T)" class="member-name-link">update</a><wbr>(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&nbsp;item)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Updates this sketch with the given item.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#method-summary" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link">wait</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.datasketches.quantilescommon.PartitioningFeature">Methods inherited from interface&nbsp;<a href="../quantilescommon/PartitioningFeature.html#method-summary" title="interface in org.apache.datasketches.quantilescommon">PartitioningFeature</a></h3>
<code><a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromNumParts(int)" title="getPartitionBoundariesFromNumParts(int)">getPartitionBoundariesFromNumParts</a>, <a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromPartSize(long)" title="getPartitionBoundariesFromPartSize(long)">getPartitionBoundariesFromPartSize</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.datasketches.quantilescommon.QuantilesGenericAPI">Methods inherited from interface&nbsp;<a href="../quantilescommon/QuantilesGenericAPI.html#method-summary" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a></h3>
<code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D)" title="getCDF(T[])">getCDF</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getMaxPartitions()" title="getMaxPartitions()">getMaxPartitions</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D)" title="getPMF(T[])">getPMF</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double)" title="getQuantile(double)">getQuantile</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D)" title="getQuantiles(double[])">getQuantiles</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T)" title="getRank(T)">getRank</a>, <a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D)" title="getRanks(T[])">getRanks</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.datasketches.quantilescommon.SketchPartitionLimits">Methods inherited from interface&nbsp;<a href="../quantilescommon/SketchPartitionLimits.html#method-summary" title="interface in org.apache.datasketches.quantilescommon">SketchPartitionLimits</a></h3>
<code><a href="../quantilescommon/SketchPartitionLimits.html#getMinPartitionSizeItems()" title="getMinPartitionSizeItems()">getMinPartitionSizeItems</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field-detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="rand">
<h3>rand</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Random.html" title="class or interface in java.util" class="external-link">Random</a></span>&nbsp;<span class="element-name">rand</span></div>
<div class="block">Setting the seed makes the results of the sketch deterministic if the input items are
received in exactly the same order. This is only useful when performing test comparisons,
otherwise, it is not recommended.</div>
</div>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="getInstance(java.lang.Class,java.util.Comparator)">
<h3>getInstance</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a>&lt;T&gt;</span>&nbsp;<span class="element-name">getInstance</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator)</span></div>
<div class="block">Obtains a new instance of an QuantilesItemsSketch using the DEFAULT_K.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><span id="getInstance(java.lang.Class,java.util.Comparator)-type-param-T"><code>T</code> - The sketch item data type.</span></dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - the given class of T.</dd>
<dd><code>comparator</code> - to compare items.</dd>
<dt>Returns:</dt>
<dd>an ItemSketch&lt;T&gt;.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getInstance(java.lang.Class,int,java.util.Comparator)">
<h3>getInstance</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a>&lt;T&gt;</span>&nbsp;<span class="element-name">getInstance</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
int&nbsp;k,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator)</span></div>
<div class="block">Obtains a new instance of an QuantilesItemsSketch using the given <i>k</i>.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><span id="getInstance(java.lang.Class,int,java.util.Comparator)-type-param-T"><code>T</code> - The sketch item data type.</span></dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - the given class of T.</dd>
<dd><code>k</code> - Parameter that controls space usage of sketch and accuracy of estimates.
Must be greater than 2 and less than 65536 and a power of 2.</dd>
<dd><code>comparator</code> - to compare items.</dd>
<dt>Returns:</dt>
<dd>an ItemSketch&lt;T&gt;.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="heapify(java.lang.Class,java.lang.foreign.MemorySegment,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)">
<h3>heapify</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="type-parameters">&lt;T&gt;</span>&nbsp;<span class="return-type"><a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a>&lt;T&gt;</span>&nbsp;<span class="element-name">heapify</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;T&gt;&nbsp;clazz,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;srcSeg,
<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super T&gt;&nbsp;comparator,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;T&gt;&nbsp;serDe)</span></div>
<div class="block">Heapifies the given srcSeg, which must be a MemorySegment image of a QuantilesItemsSketch.</div>
<dl class="notes">
<dt>Type Parameters:</dt>
<dd><span id="heapify(java.lang.Class,java.lang.foreign.MemorySegment,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)-type-param-T"><code>T</code> - The sketch item data type.</span></dd>
<dt>Parameters:</dt>
<dd><code>clazz</code> - the given class of T.</dd>
<dd><code>srcSeg</code> - a MemorySegment image of a sketch generated from this class.</dd>
<dd><code>comparator</code> - to compare items.</dd>
<dd><code>serDe</code> - an instance of ArrayOfItemsSerDe.</dd>
<dt>Returns:</dt>
<dd>a QuantilesItemsSketch&lt;T&gt; on the Java heap.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getCDF(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3 id="getCDF(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getCDF</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double[]</span>&nbsp;<span class="element-name">getCDF</span><wbr><span class="parameters">(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;splitPoints,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns an approximation to the Cumulative Distribution Function (CDF) of the input stream
as a monotonically increasing array of double ranks (or cumulative probabilities) on the interval [0.0, 1.0],
given a set of splitPoints.
<p>The resulting approximations have a probabilistic guarantee that can be obtained from the
getNormalizedRankError(false) function.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getCDF</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>splitPoints</code> - an array of <i>m</i> unique, monotonically increasing items
(of the same type as the input items)
that divide the item input domain into <i>m+1</i> overlapping intervals.
<blockquote>
<p>The start of each interval is below the lowest item retained by the sketch
corresponding to a zero rank or zero probability, and the end of the interval
is the rank or cumulative probability corresponding to the split point.</p>
<p>The <i>(m+1)th</i> interval represents 100% of the distribution represented by the sketch
and consistent with the definition of a cumulative probability distribution, thus the <i>(m+1)th</i>
rank or probability in the returned array is always 1.0.</p>
<p>If a split point exactly equals a retained item of the sketch and the search criterion is:</p>
<ul>
<li>INCLUSIVE, the resulting cumulative probability will include that item.</li>
<li>EXCLUSIVE, the resulting cumulative probability will not include the weight of that split point.</li>
</ul>
<p>It is not recommended to include either the minimum or maximum items of the input stream.</p>
</blockquote></dd>
<dd><code>searchCrit</code> - the desired search criteria.</dd>
<dt>Returns:</dt>
<dd>a discrete CDF array of m+1 double ranks (or cumulative probabilities) on the interval [0.0, 1.0].</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getClassOfT()">
<h3>getClassOfT</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Class.html" title="class or interface in java.lang" class="external-link">Class</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">getClassOfT</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getClassOfT()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns the sketch item class</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getClassOfT()">getClassOfT</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the sketch item class</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getComparator()">
<h3>getComparator</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Comparator.html" title="class or interface in java.util" class="external-link">Comparator</a>&lt;? super <a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">getComparator</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getComparator()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns the Comparator of T</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getComparator()">getComparator</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>Comparator of the sketch</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getMaxItem()">
<h3>getMaxItem</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></span>&nbsp;<span class="element-name">getMaxItem</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getMaxItem()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns the maximum item of the stream. This may be distinct from the largest item retained by the
sketch algorithm.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getMaxItem()">getMaxItem</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the maximum item of the stream</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getMinItem()">
<h3>getMinItem</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></span>&nbsp;<span class="element-name">getMinItem</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getMinItem()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns the minimum item of the stream. This may be distinct from the smallest item retained by the
sketch algorithm.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getMinItem()">getMinItem</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the minimum item of the stream</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getPartitionBoundariesFromNumParts(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3>getPartitionBoundariesFromNumParts</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">GenericPartitionBoundaries</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">getPartitionBoundariesFromNumParts</span><wbr><span class="parameters">(int&nbsp;numEquallySizedParts,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromNumParts(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">PartitioningFeature</a></code></span></div>
<div class="block">This method returns an instance of
<a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a> which provides
sufficient information for the user to create the given number of equally sized partitions, where "equally sized"
refers to an approximately equal number of items per partition.
<p>The sketch must not be empty.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromNumParts(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPartitionBoundariesFromNumParts</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/PartitioningFeature.html" title="interface in org.apache.datasketches.quantilescommon">PartitioningFeature</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>numEquallySizedParts</code> - an integer that specifies the number of equally sized partitions between
<a href="../quantilescommon/GenericPartitionBoundaries.html#getMinItem()"><code>getMinItem()</code></a> and
<a href="../quantilescommon/GenericPartitionBoundaries.html#getMaxItem()"><code>getMaxItem()</code></a>.
This must be a positive integer less than
<a href="../quantilescommon/SketchPartitionLimits.html#getMaxPartitions()"><code>getMaxPartitions()</code></a>
<ul>
<li>A 1 will return: minItem, maxItem.</li>
<li>A 2 will return: minItem, median quantile, maxItem.</li>
<li>Etc.</li>
</ul></dd>
<dd><code>searchCrit</code> - If INCLUSIVE, all the returned quantiles are the upper boundaries of the equally sized partitions
with the exception of the lowest returned quantile, which is the lowest boundary of the lowest ranked partition.
If EXCLUSIVE, all the returned quantiles are the lower boundaries of the equally sized partitions
with the exception of the highest returned quantile, which is the upper boundary of the highest ranked partition.</dd>
<dt>Returns:</dt>
<dd>an instance of <a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a>.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getPartitionBoundariesFromPartSize(long,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3>getPartitionBoundariesFromPartSize</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">GenericPartitionBoundaries</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">getPartitionBoundariesFromPartSize</span><wbr><span class="parameters">(long&nbsp;nominalPartSizeItems,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromPartSize(long,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">PartitioningFeature</a></code></span></div>
<div class="block">This method returns an instance of
<a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a> which provides
sufficient information for the user to create the given number of equally sized partitions, where "equally sized"
refers to an approximately equal number of items per partition.
<p>The sketch must not be empty.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/PartitioningFeature.html#getPartitionBoundariesFromPartSize(long,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPartitionBoundariesFromPartSize</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/PartitioningFeature.html" title="interface in org.apache.datasketches.quantilescommon">PartitioningFeature</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>nominalPartSizeItems</code> - an integer that specifies the nominal size, in items, of each target partition.
This must be a positive integer greater than
<a href="../quantilescommon/SketchPartitionLimits.html#getMinPartitionSizeItems()"><code>getMinPartitionSizeItems()</code></a>.</dd>
<dd><code>searchCrit</code> - If INCLUSIVE, all the returned quantiles are the upper boundaries of the equally sized partitions
with the exception of the lowest returned quantile, which is the lowest boundary of the lowest ranked partition.
If EXCLUSIVE, all the returned quantiles are the lower boundaries of the equally sized partitions
with the exception of the highest returned quantile, which is the upper boundary of the highest ranked partition.</dd>
<dt>Returns:</dt>
<dd>an instance of <a href="../quantilescommon/GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a>.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getPMF(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3 id="getPMF(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPMF</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double[]</span>&nbsp;<span class="element-name">getPMF</span><wbr><span class="parameters">(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;splitPoints,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Returns an approximation to the Probability Mass Function (PMF) of the input stream
as an array of probability masses as doubles on the interval [0.0, 1.0],
given a set of splitPoints.
<p>The resulting approximations have a probabilistic guarantee that can be obtained from the
getNormalizedRankError(true) function.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPMF</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>splitPoints</code> - an array of <i>m</i> unique, monotonically increasing items
(of the same type as the input items)
that divide the item input domain into <i>m+1</i> consecutive, non-overlapping intervals.
<blockquote>
<p>Each interval except for the end intervals starts with a split point and ends with the next split
point in sequence.</p>
<p>The first interval starts below the lowest item retained by the sketch
corresponding to a zero rank or zero probability, and ends with the first split point</p>
<p>The last <i>(m+1)th</i> interval starts with the last split point and ends after the last
item retained by the sketch corresponding to a rank or probability of 1.0. </p>
<p>The sum of the probability masses of all <i>(m+1)</i> intervals is 1.0.</p>
<p>If the search criterion is:</p>
<ul>
<li>INCLUSIVE, and the upper split point of an interval equals an item retained by the sketch, the interval
will include that item. If the lower split point equals an item retained by the sketch, the interval will exclude
that item.</li>
<li>EXCLUSIVE, and the upper split point of an interval equals an item retained by the sketch, the interval
will exclude that item. If the lower split point equals an item retained by the sketch, the interval will include
that item.</li>
</ul>
<p>It is not recommended to include either the minimum or maximum items of the input stream.</p>
</blockquote></dd>
<dd><code>searchCrit</code> - the desired search criteria.</dd>
<dt>Returns:</dt>
<dd>a PMF array of m+1 probability masses as doubles on the interval [0.0, 1.0].</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3>getQuantile</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></span>&nbsp;<span class="element-name">getQuantile</span><wbr><span class="parameters">(double&nbsp;rank,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the approximate quantile of the given normalized rank and the given search criterion.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantile</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>rank</code> - the given normalized rank, a double in the range [0.0, 1.0].</dd>
<dd><code>searchCrit</code> - If INCLUSIVE, the given rank includes all quantiles &le;
the quantile directly corresponding to the given rank.
If EXCLUSIVE, he given rank includes all quantiles &lt;
the quantile directly corresponding to the given rank.</dd>
<dt>Returns:</dt>
<dd>the approximate quantile given the normalized rank.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getQuantileLowerBound(double)">
<h3>getQuantileLowerBound</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></span>&nbsp;<span class="element-name">getQuantileLowerBound</span><wbr><span class="parameters">(double&nbsp;rank)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileLowerBound(double)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the lower bound of the quantile confidence interval in which the quantile of the
given rank exists.
<p>Although it is possible to estimate the probability that the true quantile
exists within the quantile confidence interval specified by the upper and lower quantile bounds,
it is not possible to guarantee the width of the quantile confidence interval
as an additive or multiplicative percent of the true quantile.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileLowerBound(double)">getQuantileLowerBound</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>rank</code> - the given normalized rank</dd>
<dt>Returns:</dt>
<dd>the lower bound of the quantile confidence interval in which the quantile of the
given rank exists.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getQuantileUpperBound(double)">
<h3>getQuantileUpperBound</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a></span>&nbsp;<span class="element-name">getQuantileUpperBound</span><wbr><span class="parameters">(double&nbsp;rank)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileUpperBound(double)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the upper bound of the quantile confidence interval in which the true quantile of the
given rank exists.
<p>Although it is possible to estimate the probability that the true quantile
exists within the quantile confidence interval specified by the upper and lower quantile bounds,
it is not possible to guarantee the width of the quantile interval
as an additive or multiplicative percent of the true quantile.</p></div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileUpperBound(double)">getQuantileUpperBound</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>rank</code> - the given normalized rank</dd>
<dt>Returns:</dt>
<dd>the upper bound of the quantile confidence interval in which the true quantile of the
given rank exists.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getQuantiles(double[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3>getQuantiles</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]</span>&nbsp;<span class="element-name">getQuantiles</span><wbr><span class="parameters">(double[]&nbsp;ranks,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets an array of quantiles from the given array of normalized ranks.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantiles</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>ranks</code> - the given array of normalized ranks, each of which must be
in the interval [0.0,1.0].</dd>
<dd><code>searchCrit</code> - if INCLUSIVE, the given ranks include all quantiles &le;
the quantile directly corresponding to each rank.</dd>
<dt>Returns:</dt>
<dd>an array of quantiles corresponding to the given array of normalized ranks.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3 id="getRank(java.lang.Object,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRank</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getRank</span><wbr><span class="parameters">(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&nbsp;quantile,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the normalized rank corresponding to the given a quantile.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRank</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>quantile</code> - the given quantile</dd>
<dd><code>searchCrit</code> - if INCLUSIVE the given quantile is included into the rank.</dd>
<dt>Returns:</dt>
<dd>the normalized rank corresponding to the given quantile.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getRankLowerBound(double)">
<h3>getRankLowerBound</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getRankLowerBound</span><wbr><span class="parameters">(double&nbsp;rank)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getRankLowerBound(double)">QuantilesAPI</a></code></span></div>
<div class="block">Gets the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getRankLowerBound(double)">getRankLowerBound</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Parameters:</dt>
<dd><code>rank</code> - the given normalized rank.</dd>
<dt>Returns:</dt>
<dd>the lower bound of the rank confidence interval in which the true rank of the
given rank exists.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getRankUpperBound(double)">
<h3>getRankUpperBound</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getRankUpperBound</span><wbr><span class="parameters">(double&nbsp;rank)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getRankUpperBound(double)">QuantilesAPI</a></code></span></div>
<div class="block">Gets the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getRankUpperBound(double)">getRankUpperBound</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Parameters:</dt>
<dd><code>rank</code> - the given normalized rank.</dd>
<dt>Returns:</dt>
<dd>the upper bound of the rank confidence interval in which the true rank of the
given rank exists.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getRanks(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">
<h3 id="getRanks(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRanks</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double[]</span>&nbsp;<span class="element-name">getRanks</span><wbr><span class="parameters">(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>[]&nbsp;quantiles,
<a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a>&nbsp;searchCrit)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets an array of normalized ranks corresponding to the given array of quantiles and the given
search criterion.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRanks</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>quantiles</code> - the given array of quantiles</dd>
<dd><code>searchCrit</code> - if INCLUSIVE, the given quantiles include the rank directly corresponding to each quantile.</dd>
<dt>Returns:</dt>
<dd>an array of normalized ranks corresponding to the given array of quantiles.</dd>
<dt>See Also:</dt>
<dd>
<ul class="tag-list">
<li><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum class in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></li>
</ul>
</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="iterator()">
<h3>iterator</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../quantilescommon/QuantilesGenericSketchIteratorAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericSketchIteratorAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">iterator</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#iterator()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the iterator for this sketch, which is not sorted.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#iterator()">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the iterator for this sketch</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getK()">
<h3>getK</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getK</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getK()">QuantilesAPI</a></code></span></div>
<div class="block">Gets the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getK()">getK</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Returns:</dt>
<dd>the user configured parameter k, which controls the accuracy of the sketch
and its memory space usage.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getN()">
<h3>getN</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">long</span>&nbsp;<span class="element-name">getN</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getN()">QuantilesAPI</a></code></span></div>
<div class="block">Gets the length of the input stream offered to the sketch..</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getN()">getN</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/SketchPartitionLimits.html#getN()">getN</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/SketchPartitionLimits.html" title="interface in org.apache.datasketches.quantilescommon">SketchPartitionLimits</a></code></dd>
<dt>Returns:</dt>
<dd>the length of the input stream offered to the sketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getNormalizedRankError(boolean)">
<h3>getNormalizedRankError</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getNormalizedRankError</span><wbr><span class="parameters">(boolean&nbsp;pmf)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getNormalizedRankError(boolean)">QuantilesAPI</a></code></span></div>
<div class="block">Gets the approximate rank error of this sketch normalized as a fraction between zero and one.
The epsilon returned is a best fit to 99 percent confidence empirically measured max error
in thousands of trials.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getNormalizedRankError(boolean)">getNormalizedRankError</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Parameters:</dt>
<dd><code>pmf</code> - if true, returns the "double-sided" normalized rank error for the getPMF() function.
Otherwise, it is the "single-sided" normalized rank error for all the other queries.</dd>
<dt>Returns:</dt>
<dd>if pmf is true, returns the "double-sided" normalized rank error for the getPMF() function.
Otherwise, it is the "single-sided" normalized rank error for all the other queries.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getNormalizedRankError(int,boolean)">
<h3>getNormalizedRankError</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">double</span>&nbsp;<span class="element-name">getNormalizedRankError</span><wbr><span class="parameters">(int&nbsp;k,
boolean&nbsp;pmf)</span></div>
<div class="block">Gets the normalized rank error given k and pmf.
Static method version of the <a href="#getNormalizedRankError(boolean)"><code>getNormalizedRankError(boolean)</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>k</code> - the configuration parameter</dd>
<dd><code>pmf</code> - if true, returns the "double-sided" normalized rank error for the getPMF() function.
Otherwise, it is the "single-sided" normalized rank error for all the other queries.</dd>
<dt>Returns:</dt>
<dd>if pmf is true, the normalized rank error for the getPMF() function.
Otherwise, it is the "single-sided" normalized rank error for all the other queries.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getKFromEpsilon(double,boolean)">
<h3>getKFromEpsilon</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getKFromEpsilon</span><wbr><span class="parameters">(double&nbsp;epsilon,
boolean&nbsp;pmf)</span></div>
<div class="block">Gets the approximate <em>k</em> to use given epsilon, the normalized rank error.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>epsilon</code> - the normalized rank error between zero and one.</dd>
<dd><code>pmf</code> - if true, this function returns <em>k</em> assuming the input epsilon
is the desired "double-sided" epsilon for the getPMF() function. Otherwise, this function
returns <em>k</em> assuming the input epsilon is the desired "single-sided"
epsilon for all the other queries.</dd>
<dt>Returns:</dt>
<dd><i>k</i> given epsilon.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="isEmpty()">
<h3>isEmpty</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isEmpty</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#isEmpty()">QuantilesAPI</a></code></span></div>
<div class="block">Returns true if this sketch is empty.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#isEmpty()">isEmpty</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Returns:</dt>
<dd>true if this sketch is empty.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="isEstimationMode()">
<h3>isEstimationMode</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isEstimationMode</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#isEstimationMode()">QuantilesAPI</a></code></span></div>
<div class="block">Returns true if this sketch is in estimation mode.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#isEstimationMode()">isEstimationMode</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Returns:</dt>
<dd>true if this sketch is in estimation mode.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="isReadOnly()">
<h3>isReadOnly</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isReadOnly</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#isReadOnly()">QuantilesAPI</a></code></span></div>
<div class="block">Returns true if this sketch is read only.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#isReadOnly()">isReadOnly</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Returns:</dt>
<dd>true if this sketch is read only.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="reset()">
<h3>reset</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">reset</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#reset()">QuantilesAPI</a></code></span></div>
<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>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#reset()">reset</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toByteArray(org.apache.datasketches.common.ArrayOfItemsSerDe)">
<h3>toByteArray</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name">toByteArray</span><wbr><span class="parameters">(<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</span></div>
<div class="block">Serialize this sketch to a byte array form.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd>
<dt>Returns:</dt>
<dd>byte array of this sketch</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toByteArray(boolean,org.apache.datasketches.common.ArrayOfItemsSerDe)">
<h3>toByteArray</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">byte[]</span>&nbsp;<span class="element-name">toByteArray</span><wbr><span class="parameters">(boolean&nbsp;ordered,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</span></div>
<div class="block">Serialize this sketch to a byte array form.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>ordered</code> - if true the base buffer will be ordered (default == false).</dd>
<dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd>
<dt>Returns:</dt>
<dd>this sketch in a byte array form.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<div class="block">Returns human readable summary information about this sketch.
Used for debugging.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#toString()">toString</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
<dt>Returns:</dt>
<dd>a summary of the key parameters of the sketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toString(boolean,boolean)">
<h3>toString</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span><wbr><span class="parameters">(boolean&nbsp;withLevels,
boolean&nbsp;withLevelsAndItems)</span></div>
<div class="block">Returns human readable summary information about this sketch.
Used for debugging.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>withLevels</code> - if true includes sketch levels array summary information</dd>
<dd><code>withLevelsAndItems</code> - if true include detail of levels array and items array together</dd>
<dt>Returns:</dt>
<dd>human readable summary information about this sketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toString(byte[])">
<h3>toString</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span><wbr><span class="parameters">(byte[]&nbsp;byteArr)</span></div>
<div class="block">Returns a human readable string of the preamble of a byte array image of an QuantilesItemsSketch.
Used for debugging.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>byteArr</code> - the given byte array</dd>
<dt>Returns:</dt>
<dd>a human readable string of the preamble of a byte array image of an QuantilesItemsSketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="toString(java.lang.foreign.MemorySegment)">
<h3>toString</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;seg)</span></div>
<div class="block">Returns a human readable string of the preamble of a MemorySegment image of an QuantilesItemsSketch.
Used for debugging.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>seg</code> - the given MemorySegment</dd>
<dt>Returns:</dt>
<dd>a human readable string of the preamble of a MemorySegment image of an QuantilesItemsSketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="downSample(int)">
<h3>downSample</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="QuantilesItemsSketch.html" title="class in org.apache.datasketches.quantiles">QuantilesItemsSketch</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">downSample</span><wbr><span class="parameters">(int&nbsp;newK)</span></div>
<div class="block">From an existing sketch, this creates a new sketch that can have a smaller K.
The original sketch is not modified.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>newK</code> - the new K that must be smaller than current K.
It is required that this.getK() = newK * 2^(nonnegative integer).</dd>
<dt>Returns:</dt>
<dd>the new sketch.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getNumRetained()">
<h3>getNumRetained</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getNumRetained</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html#getNumRetained()">QuantilesAPI</a></code></span></div>
<div class="block">Gets the number of quantiles retained by the sketch.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesAPI.html#getNumRetained()">getNumRetained</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd>
<dt>Returns:</dt>
<dd>the number of quantiles retained by the sketch</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="putIntoMemorySegment(java.lang.foreign.MemorySegment,org.apache.datasketches.common.ArrayOfItemsSerDe)">
<h3>putIntoMemorySegment</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">putIntoMemorySegment</span><wbr><span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/lang/foreign/MemorySegment.html" title="class or interface in java.lang.foreign" class="external-link">MemorySegment</a>&nbsp;dstSeg,
<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;&nbsp;serDe)</span></div>
<div class="block">Puts the current sketch into the given MemorySegment if there is sufficient space.
Otherwise, throws an error.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>dstSeg</code> - the given MemorySegment.</dd>
<dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="update(T)">
<h3 id="update(java.lang.Object)">update</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">update</span><wbr><span class="parameters">(<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&nbsp;item)</span></div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#update(T)">QuantilesGenericAPI</a></code></span></div>
<div class="block">Updates this sketch with the given item.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#update(T)">update</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Parameters:</dt>
<dd><code>item</code> - from a stream of items. Nulls are ignored.</dd>
</dl>
</div>
</section>
</li>
<li>
<section class="detail" id="getSortedView()">
<h3>getSortedView</h3>
<div class="horizontal-scroll">
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="../quantilescommon/ItemsSketchSortedView.html" title="class in org.apache.datasketches.quantilescommon">ItemsSketchSortedView</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</span>&nbsp;<span class="element-name">getSortedView</span>()</div>
<div class="block"><span class="description-from-type-label">Description copied from interface:&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html#getSortedView()">QuantilesGenericAPI</a></code></span></div>
<div class="block">Gets the sorted view of this sketch</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getSortedView()">getSortedView</a></code>&nbsp;in interface&nbsp;<code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a>&lt;<a href="#type-param-T" title="type parameter in QuantilesItemsSketch">T</a>&gt;</code></dd>
<dt>Returns:</dt>
<dd>the sorted view of this sketch</dd>
</dl>
</div>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small>Copyright &#169; 2015&#x2013;2025 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</footer>
</main>
</div>
</body>
</html>