| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>ItemsSketch (datasketches-java 4.0.0 API)</title> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script> |
| <!--[if IE]> |
| <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script> |
| <![endif]--> |
| <script type="text/javascript" src="../../../../jquery/jquery-3.6.0.min.js"></script> |
| <script type="text/javascript" src="../../../../jquery/jquery-ui.min.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="ItemsSketch (datasketches-java 4.0.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":9,"i5":9,"i6":10,"i7":9,"i8":10,"i9":10,"i10":10,"i11":10,"i12":9,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":10,"i27":10,"i28":10,"i29":10,"i30":10,"i31":10,"i32":10,"i33":10,"i34":10,"i35":10,"i36":10,"i37":10,"i38":10,"i39":10,"i40":10,"i41":10,"i42":10,"i43":9,"i44":9,"i45":10}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| var pathtoroot = "../../../../"; |
| var useModuleDirectories = true; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <header role="banner"> |
| <nav role="navigation"> |
| <div class="fixedNav"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a id="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ItemsSketch.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <ul class="navListSearch"> |
| <li><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| </div> |
| <div class="navPadding"> </div> |
| <script type="text/javascript"><!-- |
| $('.navPadding').css('padding-top', $('.fixedNav').css("height")); |
| //--> |
| </script> |
| </nav> |
| </header> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <main role="main"> |
| <div class="header"> |
| <div class="subTitle"><span class="packageLabelInType">Package</span> <a href="package-summary.html">org.apache.datasketches.quantiles</a></div> |
| <h2 title="Class ItemsSketch" class="title">Class ItemsSketch<T></h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.datasketches.quantiles.ItemsSketch<T></li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - The sketch data type</dd> |
| </dl> |
| <dl> |
| <dt>All Implemented Interfaces:</dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code>, <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><T></code></dd> |
| </dl> |
| <hr> |
| <pre>public final class <span class="typeNameLabel">ItemsSketch<T></span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a> |
| implements <a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><T></pre> |
| <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 ItemsSketch 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 DoublesSketch.</p></div> |
| <dl> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon"><code>QuantilesAPI</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ======== NESTED CLASS SUMMARY ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.class.summary"> |
| <!-- --> |
| </a> |
| <h3>Nested Class Summary</h3> |
| <ul class="blockList"> |
| <li class="blockList"><a id="nested.classes.inherited.from.class.org.apache.datasketches.quantilescommon.QuantilesGenericAPI"> |
| <!-- --> |
| </a> |
| <h3>Nested classes/interfaces inherited from interface org.apache.datasketches.quantilescommon.<a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a></h3> |
| <code><a href="../quantilescommon/QuantilesGenericAPI.GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">QuantilesGenericAPI.GenericPartitionBoundaries</a><<a href="../quantilescommon/QuantilesGenericAPI.GenericPartitionBoundaries.html" title="type parameter in QuantilesGenericAPI.GenericPartitionBoundaries">T</a>></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Field</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util" class="externalLink">Random</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#rand">rand</a></span></code></th> |
| <td class="colLast"> |
| <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> |
| </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| </section> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colSecond" scope="col">Method</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#downSample(int)">downSample</a></span>​(int newK)</code></th> |
| <td class="colLast"> |
| <div class="block">From an existing sketch, this creates a new sketch that can have a smaller K.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCDF(T%5B%5D)">getCDF</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getCDF(splitPoints, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getCDF</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <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> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInstance(java.lang.Class,int,java.util.Comparator)">getInstance</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| int k, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Obtains a new instance of an ItemsSketch.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInstance(java.lang.Class,java.util.Comparator)">getInstance</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator)</code></th> |
| <td class="colLast"> |
| <div class="block">Obtains a new instance of an ItemsSketch using the DEFAULT_K.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getInstance(java.lang.Class,org.apache.datasketches.memory.Memory,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)">getInstance</a></span>​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| org.apache.datasketches.memory.Memory srcMem, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><T> serDe)</code></th> |
| <td class="colLast"> |
| <div class="block">Heapifies the given srcMem, which must be a Memory image of a ItemsSketch</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getK()">getK</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the user configured parameter k, which controls the accuracy of the sketch |
| and its memory space usage.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getKFromEpsilon(double,boolean)">getKFromEpsilon</a></span>​(double epsilon, |
| boolean pmf)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the approximate <em>k</em> to use given epsilon, the normalized rank error.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMaxItem()">getMaxItem</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the maximum item of the stream.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getMinItem()">getMinItem</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns the minimum item of the stream.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>long</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getN()">getN</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the length of the input stream.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNormalizedRankError(boolean)">getNormalizedRankError</a></span>​(boolean pmf)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the approximate rank error of this sketch normalized as a fraction between zero and one.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNormalizedRankError(int,boolean)">getNormalizedRankError</a></span>​(int k, |
| boolean pmf)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the normalized rank error given k and pmf.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getNumRetained()">getNumRetained</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the number of quantiles retained by the sketch.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code><a href="../quantilescommon/QuantilesGenericAPI.GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">QuantilesGenericAPI.GenericPartitionBoundaries</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPartitionBoundaries(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPartitionBoundaries</a></span>​(int numEquallyWeighted, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <div class="block">This method returns an instance of |
| <a href="../quantilescommon/QuantilesGenericAPI.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 weighted partitions.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPMF(T%5B%5D)">getPMF</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getPMF(splitPoints, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPMF</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <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> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantile(double)">getQuantile</a></span>​(double rank)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getQuantile(rank, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantile</a></span>​(double rank, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the approximate quantile of the given normalized rank and the given search criterion.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantileLowerBound(double)">getQuantileLowerBound</a></span>​(double rank)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the lower bound of the quantile confidence interval in which the quantile of the |
| given rank exists.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantiles(double%5B%5D)">getQuantiles</a></span>​(double[] ranks)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getQuantiles(ranks, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantiles</a></span>​(double[] ranks, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets an array of quantiles from the given array of normalized ranks.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code><a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getQuantileUpperBound(double)">getQuantileUpperBound</a></span>​(double rank)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the upper bound of the quantile confidence interval in which the true quantile of the |
| given rank exists.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRank(T)">getRank</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> quantile)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getRank(T quantile, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRank</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> quantile, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the normalized rank corresponding to the given a quantile.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRankLowerBound(double)">getRankLowerBound</a></span>​(double rank)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the lower bound of the rank confidence interval in which the true rank of the |
| given rank exists.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRanks(T%5B%5D)">getRanks</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] quantiles)</code></th> |
| <td class="colLast"> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getRanks(quantiles, INCLUSIVE)</code></a></div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>double[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRanks</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] quantiles, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets an array of normalized ranks corresponding to the given array of quantiles and the given |
| search criterion.</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>double</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRankUpperBound(double)">getRankUpperBound</a></span>​(double rank)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the upper bound of the rank confidence interval in which the true rank of the |
| given rank exists.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSketchType()">getSketchType</a></span>()</code></th> |
| <td class="colLast"> </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code><a href="../quantilescommon/GenericSortedView.html" title="interface in org.apache.datasketches.quantilescommon">GenericSortedView</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getSortedView()">getSortedView</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the sorted view of this sketch</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#hasMemory()">hasMemory</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this sketch's data structure is backed by Memory or WritableMemory.</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isDirect()">isDirect</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEmpty()">isEmpty</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this sketch is empty.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isEstimationMode()">isEstimationMode</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this sketch is in estimation mode.</div> |
| </td> |
| </tr> |
| <tr id="i35" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#isReadOnly()">isReadOnly</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns true if this sketch is read only.</div> |
| </td> |
| </tr> |
| <tr id="i36" class="altColor"> |
| <td class="colFirst"><code><a href="../quantilescommon/QuantilesGenericSketchIterator.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericSketchIterator</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#iterator()">iterator</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the iterator for this sketch, which is not sorted.</div> |
| </td> |
| </tr> |
| <tr id="i37" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#putMemory(org.apache.datasketches.memory.WritableMemory,org.apache.datasketches.common.ArrayOfItemsSerDe)">putMemory</a></span>​(org.apache.datasketches.memory.WritableMemory dstMem, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</code></th> |
| <td class="colLast"> |
| <div class="block">Puts the current sketch into the given Memory if there is sufficient space.</div> |
| </td> |
| </tr> |
| <tr id="i38" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reset()">reset</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Resets this sketch to the empty state.</div> |
| </td> |
| </tr> |
| <tr id="i39" class="rowColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteArray(boolean,org.apache.datasketches.common.ArrayOfItemsSerDe)">toByteArray</a></span>​(boolean ordered, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</code></th> |
| <td class="colLast"> |
| <div class="block">Serialize this sketch to a byte array form.</div> |
| </td> |
| </tr> |
| <tr id="i40" class="altColor"> |
| <td class="colFirst"><code>byte[]</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toByteArray(org.apache.datasketches.common.ArrayOfItemsSerDe)">toByteArray</a></span>​(<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</code></th> |
| <td class="colLast"> |
| <div class="block">Serialize this sketch to a byte array form.</div> |
| </td> |
| </tr> |
| <tr id="i41" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString()">toString</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a summary of the key parameters of the sketch.</div> |
| </td> |
| </tr> |
| <tr id="i42" class="altColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(boolean,boolean)">toString</a></span>​(boolean sketchSummary, |
| boolean dataDetail)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns summary information about this sketch.</div> |
| </td> |
| </tr> |
| <tr id="i43" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(byte%5B%5D)">toString</a></span>​(byte[] byteArr)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a human readable string of the preamble of a byte array image of an ItemsSketch.</div> |
| </td> |
| </tr> |
| <tr id="i44" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#toString(org.apache.datasketches.memory.Memory)">toString</a></span>​(org.apache.datasketches.memory.Memory mem)</code></th> |
| <td class="colLast"> |
| <div class="block">Returns a human readable string of the preamble of a Memory image of an ItemsSketch.</div> |
| </td> |
| </tr> |
| <tr id="i45" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#update(T)">update</a></span>​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> item)</code></th> |
| <td class="colLast"> |
| <div class="block">Updates this sketch with the given item.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang" class="externalLink">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang" class="externalLink">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang" class="externalLink">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang" class="externalLink">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang" class="externalLink">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang" class="externalLink">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang" class="externalLink">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang" class="externalLink">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait(long,int)" title="class or interface in java.lang" class="externalLink">wait</a></code></li> |
| </ul> |
| <ul class="blockList"> |
| <li class="blockList"><a id="methods.inherited.from.class.org.apache.datasketches.quantilescommon.QuantilesGenericAPI"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from interface org.apache.datasketches.quantilescommon.<a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a></h3> |
| <code><a href="../quantilescommon/QuantilesGenericAPI.html#getPartitionBoundaries(int)">getPartitionBoundaries</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a id="rand"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>rand</h4> |
| <pre>public static final <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Random.html?is-external=true" title="class or interface in java.util" class="externalLink">Random</a> rand</pre> |
| <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 is not recommended.</div> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| <!-- ============ METHOD DETAIL ========== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a id="getInstance(java.lang.Class,java.util.Comparator)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre class="methodSignature">public static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T> getInstance​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator)</pre> |
| <div class="block">Obtains a new instance of an ItemsSketch using the DEFAULT_K.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - The sketch data type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - the given class of T</dd> |
| <dd><code>comparator</code> - to compare items</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a GenericQuantileSketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getInstance(java.lang.Class,int,java.util.Comparator)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre class="methodSignature">public static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T> getInstance​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| int k, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator)</pre> |
| <div class="block">Obtains a new instance of an ItemsSketch.</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - The sketch data type</dd> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>a GenericQuantileSketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getInstance(java.lang.Class,org.apache.datasketches.memory.Memory,java.util.Comparator,org.apache.datasketches.common.ArrayOfItemsSerDe)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre class="methodSignature">public static <T> <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><T> getInstance​(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><T> clazz, |
| org.apache.datasketches.memory.Memory srcMem, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/Comparator.html?is-external=true" title="class or interface in java.util" class="externalLink">Comparator</a><? super T> comparator, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><T> serDe)</pre> |
| <div class="block">Heapifies the given srcMem, which must be a Memory image of a ItemsSketch</div> |
| <dl> |
| <dt><span class="paramLabel">Type Parameters:</span></dt> |
| <dd><code>T</code> - The sketch data type</dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>clazz</code> - the given class of T</dd> |
| <dd><code>srcMem</code> - a Memory image of a sketch. |
| <a href="../../../../resources/dictionary.html#mem">See Memory</a></dd> |
| <dd><code>comparator</code> - to compare items</dd> |
| <dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a ItemsSketch on the Java heap.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCDF(java.lang.Object[])"> |
| <!-- --> |
| </a><a id="getCDF(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCDF</h4> |
| <pre class="methodSignature">public double[] getCDF​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getCDF(splitPoints, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D)">getCDF</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>splitPoints</code> - an array of <i>m</i> unique, monotonically increasing items.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a discrete CDF array of m+1 double ranks (or cumulative probabilities) on the interval [0.0, 1.0].</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getCDF(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a><a id="getCDF(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCDF</h4> |
| <pre class="methodSignature">public double[] getCDF​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getCDF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getCDF</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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. |
| |
| <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></dd> |
| <dd><code>searchCrit</code> - the desired search criteria.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a discrete CDF array of m+1 double ranks (or cumulative probabilities) on the interval [0.0, 1.0].</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSketchType()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSketchType</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang" class="externalLink">Class</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> getSketchType()</pre> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the sketch item type</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMaxItem()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMaxItem</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getMaxItem()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getMaxItem()">getMaxItem</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the maximum item of the stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getMinItem()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinItem</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getMinItem()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getMinItem()">getMinItem</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the minimum item of the stream</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getPartitionBoundaries(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPartitionBoundaries</h4> |
| <pre class="methodSignature">public <a href="../quantilescommon/QuantilesGenericAPI.GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon">QuantilesGenericAPI.GenericPartitionBoundaries</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> getPartitionBoundaries​(int numEquallyWeighted, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getPartitionBoundaries(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This method returns an instance of |
| <a href="../quantilescommon/QuantilesGenericAPI.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 weighted partitions.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getPartitionBoundaries(int,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPartitionBoundaries</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>numEquallyWeighted</code> - an integer that specifies the number of equally weighted partitions between |
| <a href="../quantilescommon/QuantilesGenericAPI.html#getMinItem()"><code>getMinItem()</code></a> and <a href="../quantilescommon/QuantilesGenericAPI.html#getMaxItem()"><code>getMaxItem()</code></a>. |
| This must be a positive integer greater than zero. |
| <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 weighted 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 weighted partitions |
| with the exception of the highest returned quantile, which is the upper boundary of the highest ranked partition.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an instance of <a href="../quantilescommon/QuantilesGenericAPI.GenericPartitionBoundaries.html" title="class in org.apache.datasketches.quantilescommon"><code>GenericPartitionBoundaries</code></a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getPMF(java.lang.Object[])"> |
| <!-- --> |
| </a><a id="getPMF(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPMF</h4> |
| <pre class="methodSignature">public double[] getPMF​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getPMF(splitPoints, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D)">getPMF</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>splitPoints</code> - an array of <i>m</i> unique, monotonically increasing items.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a PMF array of m+1 probability masses as doubles on the interval [0.0, 1.0].</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getPMF(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a><a id="getPMF(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getPMF</h4> |
| <pre class="methodSignature">public double[] getPMF​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] splitPoints, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getPMF(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getPMF</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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. |
| |
| <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></dd> |
| <dd><code>searchCrit</code> - the desired search criteria.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a PMF array of m+1 probability masses as doubles on the interval [0.0, 1.0].</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantile(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantile</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getQuantile​(double rank)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getQuantile(rank, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double)">getQuantile</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the given normalized rank, a double in the range [0.0, 1.0].</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the approximate quantile given the normalized rank.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantile</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getQuantile​(double rank, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantile(double,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantile</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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 ≤ |
| the quantile directly corresponding to the given rank. |
| If EXCLUSIVE, he given rank includes all quantiles < |
| the quantile directly corresponding to the given rank.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the approximate quantile given the normalized rank.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantileLowerBound(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantileLowerBound</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getQuantileLowerBound​(double rank)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileLowerBound(double)">getQuantileLowerBound</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the given normalized rank</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the lower bound of the quantile confidence interval in which the quantile of the |
| given rank exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantileUpperBound(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantileUpperBound</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> getQuantileUpperBound​(double rank)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantileUpperBound(double)">getQuantileUpperBound</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the given normalized rank</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the upper bound of the quantile confidence interval in which the true quantile of the |
| given rank exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantiles(double[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantiles</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] getQuantiles​(double[] ranks)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getQuantiles(ranks, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D)">getQuantiles</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>ranks</code> - the given array of normalized ranks, each of which must be |
| in the interval [0.0,1.0].</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of quantiles corresponding to the given array of normalized ranks.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getQuantiles(double[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getQuantiles</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] getQuantiles​(double[] ranks, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getQuantiles(double%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getQuantiles</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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 ≤ |
| the quantile directly corresponding to each rank.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of quantiles corresponding to the given array of normalized ranks.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRank(java.lang.Object)"> |
| <!-- --> |
| </a><a id="getRank(T)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRank</h4> |
| <pre class="methodSignature">public double getRank​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> quantile)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getRank(T quantile, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T)">getRank</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>quantile</code> - the given quantile</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the normalized rank corresponding to the given quantile.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRank(java.lang.Object,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a><a id="getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRank</h4> |
| <pre class="methodSignature">public double getRank​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> quantile, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRank(T,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRank</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>the normalized rank corresponding to the given quantile.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRankLowerBound(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRankLowerBound</h4> |
| <pre class="methodSignature">public double getRankLowerBound​(double rank)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#getRankLowerBound(double)">getRankLowerBound</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the given normalized rank.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the lower bound of the rank confidence interval in which the true rank of the |
| given rank exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRankUpperBound(double)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRankUpperBound</h4> |
| <pre class="methodSignature">public double getRankUpperBound​(double rank)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#getRankUpperBound(double)">getRankUpperBound</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rank</code> - the given normalized rank.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the upper bound of the rank confidence interval in which the true rank of the |
| given rank exists.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRanks(java.lang.Object[])"> |
| <!-- --> |
| </a><a id="getRanks(T[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRanks</h4> |
| <pre class="methodSignature">public double[] getRanks​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] quantiles)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D)">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">This is equivalent to <a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"><code>getRanks(quantiles, INCLUSIVE)</code></a></div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D)">getRanks</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>quantiles</code> - the given array of quantiles</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of normalized ranks corresponding to the given array of quantiles.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getRanks(java.lang.Object[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a><a id="getRanks(T[],org.apache.datasketches.quantilescommon.QuantileSearchCriteria)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getRanks</h4> |
| <pre class="methodSignature">public double[] getRanks​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>[] quantiles, |
| <a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon">QuantileSearchCriteria</a> searchCrit)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getRanks(T%5B%5D,org.apache.datasketches.quantilescommon.QuantileSearchCriteria)">getRanks</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>an array of normalized ranks corresponding to the given array of quantiles.</dd> |
| <dt><span class="seeLabel">See Also:</span></dt> |
| <dd><a href="../quantilescommon/QuantileSearchCriteria.html" title="enum in org.apache.datasketches.quantilescommon"><code>QuantileSearchCriteria</code></a></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="iterator()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>iterator</h4> |
| <pre class="methodSignature">public <a href="../quantilescommon/QuantilesGenericSketchIterator.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericSketchIterator</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> iterator()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#iterator()">iterator</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the iterator for this sketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getK()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getK</h4> |
| <pre class="methodSignature">public int getK()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#getK()">getK</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the user configured parameter k, which controls the accuracy of the sketch |
| and its memory space usage.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getN()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getN</h4> |
| <pre class="methodSignature">public long getN()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesAPI.html#getN()">QuantilesAPI</a></code></span></div> |
| <div class="block">Gets the length of the input stream.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#getN()">getN</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the length of the input stream.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getNormalizedRankError(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNormalizedRankError</h4> |
| <pre class="methodSignature">public double getNormalizedRankError​(boolean pmf)</pre> |
| <div class="block">Gets the approximate rank error of this sketch normalized as a fraction between zero and one.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>if pmf is true, returns the normalized rank error for the getPMF() function. |
| Otherwise, it is the "single-sided" normalized rank error for all the other queries.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getNormalizedRankError(int,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNormalizedRankError</h4> |
| <pre class="methodSignature">public static double getNormalizedRankError​(int k, |
| boolean pmf)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></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> |
| </li> |
| </ul> |
| <a id="getKFromEpsilon(double,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getKFromEpsilon</h4> |
| <pre class="methodSignature">public static int getKFromEpsilon​(double epsilon, |
| boolean pmf)</pre> |
| <div class="block">Gets the approximate <em>k</em> to use given epsilon, the normalized rank error.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd><i>k</i> given epsilon.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="hasMemory()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasMemory</h4> |
| <pre class="methodSignature">public boolean hasMemory()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesAPI.html#hasMemory()">QuantilesAPI</a></code></span></div> |
| <div class="block">Returns true if this sketch's data structure is backed by Memory or WritableMemory.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#hasMemory()">hasMemory</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this sketch's data structure is backed by Memory or WritableMemory.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isEmpty()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEmpty</h4> |
| <pre class="methodSignature">public boolean isEmpty()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesAPI.html#isEmpty()">QuantilesAPI</a></code></span></div> |
| <div class="block">Returns true if this sketch is empty.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#isEmpty()">isEmpty</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this sketch is empty.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isDirect()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isDirect</h4> |
| <pre class="methodSignature">public boolean isDirect()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesAPI.html#isDirect()">QuantilesAPI</a></code></span></div> |
| <div class="block">Returns true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#isDirect()">isDirect</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this sketch's data structure is off-heap (a.k.a., Direct or Native memory).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isEstimationMode()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isEstimationMode</h4> |
| <pre class="methodSignature">public boolean isEstimationMode()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#isEstimationMode()">isEstimationMode</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this sketch is in estimation mode.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="isReadOnly()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isReadOnly</h4> |
| <pre class="methodSignature">public boolean isReadOnly()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#isReadOnly()">isReadOnly</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if this sketch is read only.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="reset()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>reset</h4> |
| <pre class="methodSignature">public void reset()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#reset()">reset</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toByteArray(org.apache.datasketches.common.ArrayOfItemsSerDe)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toByteArray</h4> |
| <pre class="methodSignature">public byte[] toByteArray​(<a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</pre> |
| <div class="block">Serialize this sketch to a byte array form.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>byte array of this sketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toByteArray(boolean,org.apache.datasketches.common.ArrayOfItemsSerDe)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toByteArray</h4> |
| <pre class="methodSignature">public byte[] toByteArray​(boolean ordered, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</pre> |
| <div class="block">Serialize this sketch to a byte array form.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>this sketch in a byte array form.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesAPI.html#toString()">QuantilesAPI</a></code></span></div> |
| <div class="block">Returns a summary of the key parameters of the sketch.</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#toString()">toString</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="overrideSpecifyLabel">Overrides:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang" class="externalLink">toString</a></code> in class <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang" class="externalLink">Object</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a summary of the key parameters of the sketch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString(boolean,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString​(boolean sketchSummary, |
| boolean dataDetail)</pre> |
| <div class="block">Returns summary information about this sketch. Used for debugging.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>sketchSummary</code> - if true includes sketch summary</dd> |
| <dd><code>dataDetail</code> - if true includes data detail</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>summary information about the sketch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString(byte[])"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString​(byte[] byteArr)</pre> |
| <div class="block">Returns a human readable string of the preamble of a byte array image of an ItemsSketch.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>byteArr</code> - the given byte array</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a human readable string of the preamble of a byte array image of an ItemsSketch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="toString(org.apache.datasketches.memory.Memory)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>toString</h4> |
| <pre class="methodSignature">public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang" class="externalLink">String</a> toString​(org.apache.datasketches.memory.Memory mem)</pre> |
| <div class="block">Returns a human readable string of the preamble of a Memory image of an ItemsSketch.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>mem</code> - the given Memory</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a human readable string of the preamble of a Memory image of an ItemsSketch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="downSample(int)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>downSample</h4> |
| <pre class="methodSignature">public <a href="ItemsSketch.html" title="class in org.apache.datasketches.quantiles">ItemsSketch</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> downSample​(int newK)</pre> |
| <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> |
| <dt><span class="paramLabel">Parameters:</span></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><span class="returnLabel">Returns:</span></dt> |
| <dd>the new sketch.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getNumRetained()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNumRetained</h4> |
| <pre class="methodSignature">public int getNumRetained()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesAPI.html#getNumRetained()">getNumRetained</a></code> in interface <code><a href="../quantilescommon/QuantilesAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesAPI</a></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the number of quantiles retained by the sketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="putMemory(org.apache.datasketches.memory.WritableMemory,org.apache.datasketches.common.ArrayOfItemsSerDe)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>putMemory</h4> |
| <pre class="methodSignature">public void putMemory​(org.apache.datasketches.memory.WritableMemory dstMem, |
| <a href="../common/ArrayOfItemsSerDe.html" title="class in org.apache.datasketches.common">ArrayOfItemsSerDe</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> serDe)</pre> |
| <div class="block">Puts the current sketch into the given Memory if there is sufficient space. |
| Otherwise, throws an error.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>dstMem</code> - the given memory.</dd> |
| <dd><code>serDe</code> - an instance of ArrayOfItemsSerDe</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getSortedView()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSortedView</h4> |
| <pre class="methodSignature">public <a href="../quantilescommon/GenericSortedView.html" title="interface in org.apache.datasketches.quantilescommon">GenericSortedView</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>> getSortedView()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <code><a href="../quantilescommon/QuantilesGenericAPI.html#getSortedView()">QuantilesGenericAPI</a></code></span></div> |
| <div class="block">Gets the sorted view of this sketch</div> |
| <dl> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#getSortedView()">getSortedView</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the sorted view of this sketch</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="update(java.lang.Object)"> |
| <!-- --> |
| </a><a id="update(T)"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>update</h4> |
| <pre class="methodSignature">public void update​(<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a> item)</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from interface: <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> |
| <dt><span class="overrideSpecifyLabel">Specified by:</span></dt> |
| <dd><code><a href="../quantilescommon/QuantilesGenericAPI.html#update(T)">update</a></code> in interface <code><a href="../quantilescommon/QuantilesGenericAPI.html" title="interface in org.apache.datasketches.quantilescommon">QuantilesGenericAPI</a><<a href="ItemsSketch.html" title="type parameter in ItemsSketch">T</a>></code></dd> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>item</code> - from a stream of items. Nulls are ignored.</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| </div> |
| </main> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <footer role="contentinfo"> |
| <nav role="navigation"> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a id="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a id="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/ItemsSketch.html">Use</a></li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="subNav"> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../allclasses.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li><a href="#nested.class.summary">Nested</a> | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a id="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| </nav> |
| <p class="legalCopy"><small>Copyright © 2015–2022 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p> |
| </footer> |
| </body> |
| </html> |