blob: c139a1122e52460f2d73b54d1935a6ae57f822a8 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_162) on Thu Mar 14 13:13:09 PDT 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>com.yahoo.sketches.theta (com.yahoo.datasketches:sketches-core 0.13.1-SNAPSHOT API)</title>
<meta name="date" content="2019-03-14">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.yahoo.sketches.theta (com.yahoo.datasketches:sketches-core 0.13.1-SNAPSHOT API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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">
<li><a href="../../../../com/yahoo/sketches/sampling/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/yahoo/sketches/tuple/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yahoo/sketches/theta/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></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>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Package" class="title">Package&nbsp;com.yahoo.sketches.theta</h1>
<div class="docSummary">
<div class="block">The theta package contains all the sketch classes that are members of the
<a href="../../../../resources/dictionary.html#thetaSketch">Theta Sketch Framework</a>.</div>
</div>
<p>See:&nbsp;<a href="#package.description">Description</a></p>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Interface Summary table, listing interfaces, and an explanation">
<caption><span>Interface Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/HashIterator.html" title="interface in com.yahoo.sketches.theta">HashIterator</a></td>
<td class="colLast">
<div class="block">This is used to iterate over the retained hash values of the Theta sketch.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Class Summary table, listing classes, and an explanation">
<caption><span>Class Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/AnotB.html" title="class in com.yahoo.sketches.theta">AnotB</a></td>
<td class="colLast">
<div class="block">The API for the set difference operation <i>A and not B</i> operations.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/CompactSketch.html" title="class in com.yahoo.sketches.theta">CompactSketch</a></td>
<td class="colLast">
<div class="block">The parent class of all the CompactSketches.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/Intersection.html" title="class in com.yahoo.sketches.theta">Intersection</a></td>
<td class="colLast">
<div class="block">The API for intersection operations</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/JaccardSimilarity.html" title="class in com.yahoo.sketches.theta">JaccardSimilarity</a></td>
<td class="colLast">
<div class="block">Jaccard similarity of two Theta Sketches.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/PairwiseSetOperations.html" title="class in com.yahoo.sketches.theta">PairwiseSetOperations</a></td>
<td class="colLast">
<div class="block">Set Operations where the arguments are presented in pairs as in <i>C = Op(A,B)</i>.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/SetOperation.html" title="class in com.yahoo.sketches.theta">SetOperation</a></td>
<td class="colLast">
<div class="block">The parent API for all Set Operations</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/SetOperationBuilder.html" title="class in com.yahoo.sketches.theta">SetOperationBuilder</a></td>
<td class="colLast">
<div class="block">For building a new SetOperation.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/SingleItemSketch.html" title="class in com.yahoo.sketches.theta">SingleItemSketch</a></td>
<td class="colLast">&nbsp;</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/Sketch.html" title="class in com.yahoo.sketches.theta">Sketch</a></td>
<td class="colLast">
<div class="block">The top-level class for all sketches.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/Sketches.html" title="class in com.yahoo.sketches.theta">Sketches</a></td>
<td class="colLast">
<div class="block">This class brings together the common sketch and set operation creation methods and
the public static methods into one place.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/Union.html" title="class in com.yahoo.sketches.theta">Union</a></td>
<td class="colLast">
<div class="block">The API for Union operations</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/UpdateSketch.html" title="class in com.yahoo.sketches.theta">UpdateSketch</a></td>
<td class="colLast">
<div class="block">The parent class for the Update Sketch families, such as QuickSelect and Alpha.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/UpdateSketchBuilder.html" title="class in com.yahoo.sketches.theta">UpdateSketchBuilder</a></td>
<td class="colLast">
<div class="block">For building a new UpdateSketch.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Summary table, listing enums, and an explanation">
<caption><span>Enum Summary</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Enum</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="../../../../com/yahoo/sketches/theta/UpdateReturnState.html" title="enum in com.yahoo.sketches.theta">UpdateReturnState</a></td>
<td class="colLast">
<div class="block"><a href="../../../../resources/dictionary.html#updateReturnState">See Update Return State</a></div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
<a name="package.description">
<!-- -->
</a>
<h2 title="Package com.yahoo.sketches.theta Description">Package com.yahoo.sketches.theta Description</h2>
<div class="block"><p>The theta package contains all the sketch classes that are members of the
<a href="../../../../resources/dictionary.html#thetaSketch">Theta Sketch Framework</a>.
The basic sketching functionality in this package is also
accessible from Hadoop Pig UDFs found in the <i>sketches-pig</i> repository,
and from Hadoop Hive UADFs and UDFs found in the <i>sketches-hive</i> repository.
</p>
<h3>Simple Java Example</h3>
Note: The complete example code can be found in the parallel package under src/test/java and
with the class name "ExamplesTest.java".
<pre>
public void SimpleCountingSketch() {
int k = 4096;
int u = 1000000;
UpdateSketch sketch = UpdateSketch.builder().build(k);
for (int i = 0; i &lt; u; i++) {
sketch.update(i);
}
println(sketch.toString());
}
### HeapQuickSelectSketch SUMMARY:
Nominal Entries (k) : 4096
Estimate : 1002714.745231455
Upper Bound, 95% conf : 1027777.3354974985
Lower Bound, 95% conf : 978261.4472857157
p : 1.0
Theta (double) : 0.00654223948655085
Theta (long) : 60341508738660257
Theta (long, hex : 00d66048519437a1
EstMode? : true
Empty? : false
Resize Factor : 8
Array Size Entries : 8192
Retained Entries : 6560
Update Seed : 9001
Seed Hash : ffff93cc
### END SKETCH SUMMARY
</pre></div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lee Rhodes</dd>
</dl>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-use.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">
<li><a href="../../../../com/yahoo/sketches/sampling/package-summary.html">Prev&nbsp;Package</a></li>
<li><a href="../../../../com/yahoo/sketches/tuple/package-summary.html">Next&nbsp;Package</a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?com/yahoo/sketches/theta/package-summary.html" target="_top">Frames</a></li>
<li><a href="package-summary.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2019. All rights reserved.</small></p>
</body>
</html>