blob: 6f3326fe9efad039d7cb86e7da8e873485238fc1 [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_302) on Wed Jan 26 15:15:51 PST 2022 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>AnotB (datasketches-java 3.1.0 API)</title>
<meta name="date" content="2022-01-26">
<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="AnotB (datasketches-java 3.1.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":6,"i2":10,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AnotB.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>Prev&nbsp;Class</li>
<li><a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/datasketches/theta/AnotB.html" target="_top">Frames</a></li>
<li><a href="AnotB.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.datasketches.theta</div>
<h2 title="Class AnotB" class="title">Class AnotB</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">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../org/apache/datasketches/theta/SetOperation.html" title="class in org.apache.datasketches.theta">org.apache.datasketches.theta.SetOperation</a></li>
<li>
<ul class="inheritance">
<li>org.apache.datasketches.theta.AnotB</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public abstract class <span class="typeNameLabel">AnotB</span>
extends <a href="../../../../org/apache/datasketches/theta/SetOperation.html" title="class in org.apache.datasketches.theta">SetOperation</a></pre>
<div class="block">Computes a set difference, A-AND-NOT-B, of two theta sketches.
This class includes both stateful and stateless operations.
<p>The stateful operation is as follows:</p>
<pre><code>
AnotB anotb = SetOperationBuilder.buildAnotB();
anotb.setA(Sketch skA); //The first argument.
anotb.notB(Sketch skB); //The second (subtraction) argument.
anotb.notB(Sketch skC); // ...any number of additional subtractions...
anotb.getResult(false); //Get an interim result.
anotb.notB(Sketch skD); //Additional subtractions.
anotb.getResult(true); //Final result and resets the AnotB operator.
</code></pre>
<p>The stateless operation is as follows:</p>
<pre><code>
AnotB anotb = SetOperationBuilder.buildAnotB();
CompactSketch csk = anotb.aNotB(Sketch skA, Sketch skB);
</code></pre>
<p>Calling the <i>setA</i> operation a second time essentially clears the internal state and loads
the new sketch.</p>
<p>The stateless and stateful operations are independent of each other with the exception of
sharing the same update hash seed loaded as the default seed or specified by the user as an
argument to the builder.</p></div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lee Rhodes</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#AnotB--">AnotB</a></span>()</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#aNotB-org.apache.datasketches.theta.Sketch-org.apache.datasketches.theta.Sketch-">aNotB</a></span>(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA,
<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB)</code>
<div class="block">Perform A-and-not-B set operation on the two given sketches and return the result as an
ordered CompactSketch on the heap.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#aNotB-org.apache.datasketches.theta.Sketch-org.apache.datasketches.theta.Sketch-boolean-org.apache.datasketches.memory.WritableMemory-">aNotB</a></span>(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA,
<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB,
boolean&nbsp;dstOrdered,
org.apache.datasketches.memory.WritableMemory&nbsp;dstMem)</code>
<div class="block">Perform A-and-not-B set operation on the two given sketches and return the result as a
CompactSketch.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/datasketches/Family.html" title="enum in org.apache.datasketches">Family</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#getFamily--">getFamily</a></span>()</code>
<div class="block">Gets the Family of this SetOperation</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>abstract <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-">getResult</a></span>(boolean&nbsp;reset)</code>
<div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls
to <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>).</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>abstract <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-org.apache.datasketches.memory.WritableMemory-boolean-">getResult</a></span>(boolean&nbsp;dstOrdered,
org.apache.datasketches.memory.WritableMemory&nbsp;dstMem,
boolean&nbsp;reset)</code>
<div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls
to <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>).</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-">notB</a></span>(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB)</code>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the
second (or <i>n+1</i>th) argument <i>B</i> of <i>A-AND-NOT-B</i>.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>abstract void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-">setA</a></span>(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA)</code>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the
first argument <i>A</i> of <i>A-AND-NOT-B</i>.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.datasketches.theta.SetOperation">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.datasketches.theta.<a href="../../../../org/apache/datasketches/theta/SetOperation.html" title="class in org.apache.datasketches.theta">SetOperation</a></h3>
<code><a href="../../../../org/apache/datasketches/theta/SetOperation.html#builder--">builder</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#getMaxAnotBResultBytes-int-">getMaxAnotBResultBytes</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#getMaxIntersectionBytes-int-">getMaxIntersectionBytes</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#getMaxUnionBytes-int-">getMaxUnionBytes</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#heapify-org.apache.datasketches.memory.Memory-">heapify</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#heapify-org.apache.datasketches.memory.Memory-long-">heapify</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#isSameResource-org.apache.datasketches.memory.Memory-">isSameResource</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#wrap-org.apache.datasketches.memory.Memory-">wrap</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#wrap-org.apache.datasketches.memory.Memory-long-">wrap</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#wrap-org.apache.datasketches.memory.WritableMemory-">wrap</a>, <a href="../../../../org/apache/datasketches/theta/SetOperation.html#wrap-org.apache.datasketches.memory.WritableMemory-long-">wrap</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;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">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">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">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">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">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">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">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">notifyAll</a>, <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">toString</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">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">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">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="AnotB--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>AnotB</h4>
<pre>public&nbsp;AnotB()</pre>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getFamily--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getFamily</h4>
<pre>public&nbsp;<a href="../../../../org/apache/datasketches/Family.html" title="enum in org.apache.datasketches">Family</a>&nbsp;getFamily()</pre>
<div class="block"><span class="descfrmTypeLabel">Description copied from class:&nbsp;<code><a href="../../../../org/apache/datasketches/theta/SetOperation.html#getFamily--">SetOperation</a></code></span></div>
<div class="block">Gets the Family of this SetOperation</div>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="../../../../org/apache/datasketches/theta/SetOperation.html#getFamily--">getFamily</a></code>&nbsp;in class&nbsp;<code><a href="../../../../org/apache/datasketches/theta/SetOperation.html" title="class in org.apache.datasketches.theta">SetOperation</a></code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Family of this SetOperation</dd>
</dl>
</li>
</ul>
<a name="setA-org.apache.datasketches.theta.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setA</h4>
<pre>public abstract&nbsp;void&nbsp;setA(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA)</pre>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the
first argument <i>A</i> of <i>A-AND-NOT-B</i>. This overwrites the internal state of this
AnotB operator with the contents of the given sketch.
This sets the stage for multiple following <i>notB</i> steps.
<p>An input argument of null will throw an exception.</p>
<p>Rationale: In mathematics a "null set" is a set with no members, which we call an empty set.
That is distinctly different from the java <i>null</i>, which represents a nonexistent object.
In most cases it is a programming error due to some object that was not properly initialized.
With a null as the first argument, we cannot know what the user's intent is.
Since it is very likely that a <i>null</i> is a programming error, we throw a an exception.</p>
<p>An empty input argument will set the internal state to empty.</p>
<p>Rationale: An empty set is a mathematically legal concept. Although it makes any subsequent,
valid argument for B irrelevant, we must allow this and assume the user knows what they are
doing.</p>
<p>Performing <a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-"><code>getResult(boolean)</code></a> just after this step will return a compact form of
the given argument.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skA</code> - The incoming sketch for the first argument, <i>A</i>.</dd>
</dl>
</li>
</ul>
<a name="notB-org.apache.datasketches.theta.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notB</h4>
<pre>public abstract&nbsp;void&nbsp;notB(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB)</pre>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Theta sketch as the
second (or <i>n+1</i>th) argument <i>B</i> of <i>A-AND-NOT-B</i>.
Performs an <i>AND NOT</i> operation with the existing internal state of this AnotB operator.
<p>An input argument of null or empty is ignored.</p>
<p>Rationale: A <i>null</i> for the second or following arguments is more tolerable because
<i>A NOT null</i> is still <i>A</i> even if we don't know exactly what the null represents. It
clearly does not have any content that overlaps with <i>A</i>. Also, because this can be part of
a multistep operation with multiple <i>notB</i> steps. Other following steps can still produce
a valid result.</p>
<p>Use <a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-"><code>getResult(boolean)</code></a> to obtain the result.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skB</code> - The incoming Theta sketch for the second (or following) argument <i>B</i>.</dd>
</dl>
</li>
</ul>
<a name="getResult-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResult</h4>
<pre>public abstract&nbsp;<a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a>&nbsp;getResult(boolean&nbsp;reset)</pre>
<div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls
to <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>reset</code> - If <i>true</i>, clears this operator to the empty state after this result is
returned. Set this to <i>false</i> if you wish to obtain an intermediate result.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result of this operation as an ordered, on-heap <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta"><code>CompactSketch</code></a>.</dd>
</dl>
</li>
</ul>
<a name="getResult-boolean-org.apache.datasketches.memory.WritableMemory-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getResult</h4>
<pre>public abstract&nbsp;<a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a>&nbsp;getResult(boolean&nbsp;dstOrdered,
org.apache.datasketches.memory.WritableMemory&nbsp;dstMem,
boolean&nbsp;reset)</pre>
<div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls
to <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>).</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>dstOrdered</code> - If <i>true</i>, the result will be an ordered <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta"><code>CompactSketch</code></a>.
<a href="../../../../resources/dictionary.html#dstOrdered">See Destination Ordered</a>.</dd>
<dd><code>dstMem</code> - if not <i>null</i> the given Memory will be the target location of the result.
<a href="../../../../resources/dictionary.html#dstMem">See Destination Memory</a>.</dd>
<dd><code>reset</code> - If <i>true</i>, clears this operator to the empty state after this result is
returned. Set this to <i>false</i> if you wish to obtain an intermediate result.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result of this operation as a <a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta"><code>CompactSketch</code></a> in the given dstMem.</dd>
</dl>
</li>
</ul>
<a name="aNotB-org.apache.datasketches.theta.Sketch-org.apache.datasketches.theta.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>aNotB</h4>
<pre>public&nbsp;<a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a>&nbsp;aNotB(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA,
<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB)</pre>
<div class="block">Perform A-and-not-B set operation on the two given sketches and return the result as an
ordered CompactSketch on the heap.
<p>This a stateless operation and has no impact on the internal state of this operator.
Thus, this is not an accumulating update and does not interact with the <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a>,
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a>, <a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-"><code>getResult(boolean)</code></a>, or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-org.apache.datasketches.memory.WritableMemory-boolean-"><code>getResult(boolean, WritableMemory, boolean)</code></a> methods.</p>
<p>If either argument is null an exception is thrown.</p>
<p>Rationale: In mathematics a "null set" is a set with no members, which we call an empty set.
That is distinctly different from the java <i>null</i>, which represents a nonexistent object.
In most cases <i>null</i> is a programming error due to a non-initialized object. </p>
<p>With a null as the first argument we cannot know what the user's intent is and throw an
exception. With a null as the second argument for this method we must return a result and
there is no following possible viable arguments for the second argument so we thrown an
exception.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skA</code> - The incoming sketch for the first argument. It must not be null.</dd>
<dd><code>skB</code> - The incoming sketch for the second argument. It must not be null.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an ordered CompactSketch on the heap</dd>
</dl>
</li>
</ul>
<a name="aNotB-org.apache.datasketches.theta.Sketch-org.apache.datasketches.theta.Sketch-boolean-org.apache.datasketches.memory.WritableMemory-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>aNotB</h4>
<pre>public abstract&nbsp;<a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a>&nbsp;aNotB(<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skA,
<a href="../../../../org/apache/datasketches/theta/Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a>&nbsp;skB,
boolean&nbsp;dstOrdered,
org.apache.datasketches.memory.WritableMemory&nbsp;dstMem)</pre>
<div class="block">Perform A-and-not-B set operation on the two given sketches and return the result as a
CompactSketch.
<p>This a stateless operation and has no impact on the internal state of this operator.
Thus, this is not an accumulating update and does not interact with the <a href="../../../../org/apache/datasketches/theta/AnotB.html#setA-org.apache.datasketches.theta.Sketch-"><code>setA(Sketch)</code></a>,
<a href="../../../../org/apache/datasketches/theta/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a>, <a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-"><code>getResult(boolean)</code></a>, or
<a href="../../../../org/apache/datasketches/theta/AnotB.html#getResult-boolean-org.apache.datasketches.memory.WritableMemory-boolean-"><code>getResult(boolean, WritableMemory, boolean)</code></a> methods.</p>
<p>If either argument is null an exception is thrown.</p>
<p>Rationale: In mathematics a "null set" is a set with no members, which we call an empty set.
That is distinctly different from the java <i>null</i>, which represents a nonexistent object.
In most cases <i>null</i> is a programming error due to a non-initialized object. </p>
<p>With a null as the first argument we cannot know what the user's intent is and throw an
exception. With a null as the second argument for this method we must return a result and
there is no following possible viable arguments for the second argument so we thrown an
exception.</p></div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skA</code> - The incoming sketch for the first argument. It must not be null.</dd>
<dd><code>skB</code> - The incoming sketch for the second argument. It must not be null.</dd>
<dd><code>dstOrdered</code> - <a href="../../../../resources/dictionary.html#dstOrdered">See Destination Ordered</a>.</dd>
<dd><code>dstMem</code> - <a href="../../../../resources/dictionary.html#dstMem">See Destination Memory</a>.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result as a CompactSketch.</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= 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><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/AnotB.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>Prev&nbsp;Class</li>
<li><a href="../../../../org/apache/datasketches/theta/CompactSketch.html" title="class in org.apache.datasketches.theta"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/datasketches/theta/AnotB.html" target="_top">Frames</a></li>
<li><a href="AnotB.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>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2015&#x2013;2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>