leerho commented on a change in pull request #324:
URL:
https://github.com/apache/incubator-datasketches-java/pull/324#discussion_r452536019
##########
File path: src/main/java/org/apache/datasketches/theta/AnotB.java
##########
@@ -47,55 +62,125 @@ public Family getFamily() {
}
/**
- * Gets the result of this operation as an ordered CompactSketch on the Java
heap
- * @return the result of this operation as an ordered CompactSketch on the
Java heap
+ * This is a stateful input operation. This method sets the given Sketch as
the first
+ * argument <i>A</i> of a stateful <i>AnotB</i> operation. This overwrites
the internal state of
+ * this AnotB operator with the contents of the given sketch. This sets the
stage for multiple
+ * stateful subsequent {@link #notB(Sketch)} operations. The ultimate result
is obtained using
+ * the {@link #getResult(boolean)} or {@link #getResult(boolean,
WritableMemory, boolean)}.
+ *
+ * <p>An input argument of null will throw an exception.</p>
+ *
+ * @param skA The incoming sketch for the first argument, <i>A</i>.
*/
- public abstract CompactSketch getResult();
+ public abstract void setA(Sketch skA);
+
+ /**
+ * Performs a stateful <i>AND NOT</i> operation with the existing internal
state of this AnotB
+ * operator. Use {@link #getResult(boolean)} or {@link #getResult(boolean,
WritableMemory, boolean)}
+ * to obtain the result.
+ *
+ * <p>An input argument of null or empty is ignored.</p>
+ *
+ * @param skB The incoming sketch for the second (or following) argument
<i>B</i>.
+ */
+ public abstract void notB(Sketch skB);
+
+ /**
+ * Gets the result of this operation as an ordered CompactSketch on the Java
heap.
+ * @param reset If true, clears this operator to the empty state after
result is returned.
+ * @return the result of this operation as a CompactSketch.
+ */
+ public abstract CompactSketch getResult(boolean reset);
/**
- * Gets the result of this set operation as a CompactSketch of the chosen
form
+ * Gets the result of this stateful set operation as a CompactSketch of the
chosen form. The
Review comment:
Fixed, thank you!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]