| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <title>AnotB (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="AnotB (datasketches-java 4.0.0 API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var data = {"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"; |
| 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/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" 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>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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.theta</a></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" class="externalLink">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li><a href="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> |
| <pre>public abstract class <span class="typeNameLabel">AnotB</span> |
| extends <a href="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 ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.summary"> |
| <!-- --> |
| </a> |
| <h3>Constructor Summary</h3> |
| <table class="memberSummary"> |
| <caption><span>Constructors</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Constructor</th> |
| <th class="colLast" scope="col">Description</th> |
| </tr> |
| <tr class="altColor"> |
| <th class="colConstructorName" scope="row"><code><span class="memberNameLink"><a href="#%3Cinit%3E()">AnotB</a></span>()</code></th> |
| <td class="colLast"> </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="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract 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="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#aNotB(org.apache.datasketches.theta.Sketch,org.apache.datasketches.theta.Sketch)">aNotB</a></span>​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skA, |
| <a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skB)</code></th> |
| <td class="colLast"> |
| <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="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#aNotB(org.apache.datasketches.theta.Sketch,org.apache.datasketches.theta.Sketch,boolean,org.apache.datasketches.memory.WritableMemory)">aNotB</a></span>​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skA, |
| <a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skB, |
| boolean dstOrdered, |
| org.apache.datasketches.memory.WritableMemory dstMem)</code></th> |
| <td class="colLast"> |
| <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="../common/Family.html" title="enum in org.apache.datasketches.common">Family</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getFamily()">getFamily</a></span>()</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the Family of this SetOperation</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>abstract <a href="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResult(boolean)">getResult</a></span>​(boolean reset)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls |
| to <a href="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a> and (<a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a> or |
| <a href="#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="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a></code></td> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResult(boolean,org.apache.datasketches.memory.WritableMemory,boolean)">getResult</a></span>​(boolean dstOrdered, |
| org.apache.datasketches.memory.WritableMemory dstMem, |
| boolean reset)</code></th> |
| <td class="colLast"> |
| <div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls |
| to <a href="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a> and (<a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a> or |
| <a href="#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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#notB(org.apache.datasketches.theta.Sketch)">notB</a></span>​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skB)</code></th> |
| <td class="colLast"> |
| <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> |
| <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setA(org.apache.datasketches.theta.Sketch)">setA</a></span>​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skA)</code></th> |
| <td class="colLast"> |
| <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 id="methods.inherited.from.class.org.apache.datasketches.theta.SetOperation"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class org.apache.datasketches.theta.<a href="SetOperation.html" title="class in org.apache.datasketches.theta">SetOperation</a></h3> |
| <code><a href="SetOperation.html#builder()">builder</a>, <a href="SetOperation.html#getMaxAnotBResultBytes(int)">getMaxAnotBResultBytes</a>, <a href="SetOperation.html#getMaxIntersectionBytes(int)">getMaxIntersectionBytes</a>, <a href="SetOperation.html#getMaxUnionBytes(int)">getMaxUnionBytes</a>, <a href="SetOperation.html#heapify(org.apache.datasketches.memory.Memory)">heapify</a>, <a href="SetOperation.html#heapify(org.apache.datasketches.memory.Memory,long)">heapify</a>, <a href="SetOperation.html#isSameResource(org.apache.datasketches.memory.Memory)">isSameResource</a>, <a href="SetOperation.html#wrap(org.apache.datasketches.memory.Memory)">wrap</a>, <a href="SetOperation.html#wrap(org.apache.datasketches.memory.Memory,long)">wrap</a>, <a href="SetOperation.html#wrap(org.apache.datasketches.memory.WritableMemory)">wrap</a>, <a href="SetOperation.html#wrap(org.apache.datasketches.memory.WritableMemory,long)">wrap</a></code></li> |
| </ul> |
| <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#toString()" title="class or interface in java.lang" class="externalLink">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" 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> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ========= CONSTRUCTOR DETAIL ======== --> |
| <section> |
| <ul class="blockList"> |
| <li class="blockList"><a id="constructor.detail"> |
| <!-- --> |
| </a> |
| <h3>Constructor Detail</h3> |
| <a id="<init>()"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>AnotB</h4> |
| <pre>public AnotB()</pre> |
| </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="getFamily()"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFamily</h4> |
| <pre class="methodSignature">public <a href="../common/Family.html" title="enum in org.apache.datasketches.common">Family</a> getFamily()</pre> |
| <div class="block"><span class="descfrmTypeLabel">Description copied from class: <code><a href="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="SetOperation.html#getFamily()">getFamily</a></code> in class <code><a href="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 id="setA(org.apache.datasketches.theta.Sketch)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setA</h4> |
| <pre class="methodSignature">public abstract void setA​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> 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="#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 id="notB(org.apache.datasketches.theta.Sketch)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>notB</h4> |
| <pre class="methodSignature">public abstract void notB​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> 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="#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 id="getResult(boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResult</h4> |
| <pre class="methodSignature">public abstract <a href="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a> getResult​(boolean reset)</pre> |
| <div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls |
| to <a href="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a> and (<a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a> or |
| <a href="#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="CompactSketch.html" title="class in org.apache.datasketches.theta"><code>CompactSketch</code></a>.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="getResult(boolean,org.apache.datasketches.memory.WritableMemory,boolean)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getResult</h4> |
| <pre class="methodSignature">public abstract <a href="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a> getResult​(boolean dstOrdered, |
| org.apache.datasketches.memory.WritableMemory dstMem, |
| boolean reset)</pre> |
| <div class="block">Gets the result of the multistep, stateful operation AnotB that have been executed with calls |
| to <a href="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a> and (<a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a> or |
| <a href="#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="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="CompactSketch.html" title="class in org.apache.datasketches.theta"><code>CompactSketch</code></a> in the given dstMem.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a id="aNotB(org.apache.datasketches.theta.Sketch,org.apache.datasketches.theta.Sketch)"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>aNotB</h4> |
| <pre class="methodSignature">public <a href="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a> aNotB​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skA, |
| <a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> 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="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a>, |
| <a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a>, <a href="#getResult(boolean)"><code>getResult(boolean)</code></a>, or |
| <a href="#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 id="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 class="methodSignature">public abstract <a href="CompactSketch.html" title="class in org.apache.datasketches.theta">CompactSketch</a> aNotB​(<a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skA, |
| <a href="Sketch.html" title="class in org.apache.datasketches.theta">Sketch</a> skB, |
| boolean dstOrdered, |
| org.apache.datasketches.memory.WritableMemory 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="#setA(org.apache.datasketches.theta.Sketch)"><code>setA(Sketch)</code></a>, |
| <a href="#notB(org.apache.datasketches.theta.Sketch)"><code>notB(Sketch)</code></a>, <a href="#getResult(boolean)"><code>getResult(boolean)</code></a>, or |
| <a href="#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> |
| </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/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" 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>Nested | </li> |
| <li>Field | </li> |
| <li><a href="#constructor.summary">Constr</a> | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li><a href="#constructor.detail">Constr</a> | </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> |