blob: 7cf2ee29116866cda0d91a708b29c4f415c4986a [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":9,"i1":9,"i2":10,"i3":10,"i4":10,"i5":10,"i6":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";
</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/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/datasketches/tuple/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.tuple</div>
<h2 title="Class AnotB" class="title">Class AnotB&lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;</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>org.apache.datasketches.tuple.AnotB&lt;S&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - Type of Summary</dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">AnotB&lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;</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">Object</a></pre>
<div class="block">Computes a set difference, A-AND-NOT-B, of two generic tuple sketches.
This class includes both stateful and stateless operations.
<p>The stateful operation is as follows:</p>
<pre><code>
AnotB anotb = new AnotB();
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 = new AnotB();
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.</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/tuple/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="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></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="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>static &lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;<br><a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;S&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/AnotB.html#aNotB-org.apache.datasketches.tuple.Sketch-org.apache.datasketches.theta.Sketch-">aNotB</a></span>(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&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">Returns the A-and-not-B set operation on a Tuple sketch and a Theta sketch.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static &lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;<br><a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;S&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/AnotB.html#aNotB-org.apache.datasketches.tuple.Sketch-org.apache.datasketches.tuple.Sketch-">aNotB</a></span>(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&nbsp;skA,
<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&nbsp;skB)</code>
<div class="block">Returns the A-and-not-B set operation on the two given Tuple sketches.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/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/tuple/AnotB.html#setA-org.apache.datasketches.tuple.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>).</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/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="i4" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.tuple.Sketch-">notB</a></span>(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;&nbsp;skB)</code>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Tuple 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="i5" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/AnotB.html#reset--">reset</a></span>()</code>
<div class="block">Resets this operation back to the empty state.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/datasketches/tuple/AnotB.html#setA-org.apache.datasketches.tuple.Sketch-">setA</a></span>(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;&nbsp;skA)</code>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Tuple 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.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="setA-org.apache.datasketches.tuple.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setA</h4>
<pre>public&nbsp;void&nbsp;setA(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;&nbsp;skA)</pre>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Tuple 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/tuple/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.tuple.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>notB</h4>
<pre>public&nbsp;void&nbsp;notB(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;&nbsp;skB)</pre>
<div class="block">This is part of a multistep, stateful AnotB operation and sets the given Tuple 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/tuple/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 Tuple sketch for the second (or following) argument <i>B</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&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.
Calls to this method can be intermingled with calls to
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>.
<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/tuple/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&nbsp;<a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;<a href="../../../../org/apache/datasketches/tuple/AnotB.html" title="type parameter in AnotB">S</a>&gt;&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/tuple/AnotB.html#setA-org.apache.datasketches.tuple.Sketch-"><code>setA(Sketch)</code></a> and (<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a> or
<a href="../../../../org/apache/datasketches/tuple/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 unordered <a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple"><code>CompactSketch</code></a>.</dd>
</dl>
</li>
</ul>
<a name="aNotB-org.apache.datasketches.tuple.Sketch-org.apache.datasketches.tuple.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>aNotB</h4>
<pre>public static&nbsp;&lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;&nbsp;<a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;S&gt;&nbsp;aNotB(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&nbsp;skA,
<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&nbsp;skB)</pre>
<div class="block">Returns the A-and-not-B set operation on the two given Tuple sketches.
<p>This a stateless operation and has no impact on the internal state of this operator.
Thus, this is not an accumulating update and is independent of the <a href="../../../../org/apache/datasketches/tuple/AnotB.html#setA-org.apache.datasketches.tuple.Sketch-"><code>setA(Sketch)</code></a>,
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a>, <a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>, and
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#getResult-boolean-"><code>getResult(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 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.
With a null as the second argument, we can't ignore it as we must return a result and there is
no following possible viable arguments for the second argument.
Since it is very likely that a <i>null</i> is a programming error, we throw an exception.</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - Type of Summary</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skA</code> - The incoming Tuple sketch for the first argument</dd>
<dd><code>skB</code> - The incoming Tuple sketch for the second argument</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result as an unordered <a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple"><code>CompactSketch</code></a></dd>
</dl>
</li>
</ul>
<a name="aNotB-org.apache.datasketches.tuple.Sketch-org.apache.datasketches.theta.Sketch-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>aNotB</h4>
<pre>public static&nbsp;&lt;S extends <a href="../../../../org/apache/datasketches/tuple/Summary.html" title="interface in org.apache.datasketches.tuple">Summary</a>&gt;&nbsp;<a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple">CompactSketch</a>&lt;S&gt;&nbsp;aNotB(<a href="../../../../org/apache/datasketches/tuple/Sketch.html" title="class in org.apache.datasketches.tuple">Sketch</a>&lt;S&gt;&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">Returns the A-and-not-B set operation on a Tuple sketch and a Theta sketch.
<p>This a stateless operation and has no impact on the internal state of this operator.
Thus, this is not an accumulating update and is independent of the <a href="../../../../org/apache/datasketches/tuple/AnotB.html#setA-org.apache.datasketches.tuple.Sketch-"><code>setA(Sketch)</code></a>,
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(Sketch)</code></a>, <a href="../../../../org/apache/datasketches/tuple/AnotB.html#notB-org.apache.datasketches.theta.Sketch-"><code>notB(org.apache.datasketches.theta.Sketch)</code></a>, and
<a href="../../../../org/apache/datasketches/tuple/AnotB.html#getResult-boolean-"><code>getResult(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 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.
With a null as the second argument, we can't ignore it as we must return a result and there is
no following possible viable arguments for the second argument.
Since it is very likely that a <i>null</i> is a programming error for either argument
we throw a an exception.</p></div>
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>S</code> - Type of Summary</dd>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>skA</code> - The incoming Tuple sketch for the first argument</dd>
<dd><code>skB</code> - The incoming Theta sketch for the second argument</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the result as an unordered <a href="../../../../org/apache/datasketches/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple"><code>CompactSketch</code></a></dd>
</dl>
</li>
</ul>
<a name="reset--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>reset</h4>
<pre>public&nbsp;void&nbsp;reset()</pre>
<div class="block">Resets this operation back to the empty state.</div>
</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/tuple/CompactSketch.html" title="class in org.apache.datasketches.tuple"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/datasketches/tuple/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>