You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by GitBox <gi...@apache.org> on 2020/02/14 02:24:33 UTC

[GitHub] [incubator-datasketches-java] leerho commented on issue #301: Does Union support multi Sketch flavor updates?

leerho commented on issue #301: Does Union support multi Sketch flavor updates?
URL: https://github.com/apache/incubator-datasketches-java/issues/301#issuecomment-586066714
 
 
   As stated in the [documentation](https://datasketches.apache.org/api/java/snapshot/apidocs/index.html), the AnotB operation is not iterative like Intersection and Union.  It is a stateless function that resets after the getResult.   So your second call to aNotB returns 0.   So instead of your code try this:
   
   ```
   AnotB aNotB = SetOperationBuilder.buildAnotB();
   aNotB.update(SketchA, SketchB); //Called only once.
   CompactSketch result = aNotB.getResult();
   System.out.println(result.getEstimate());
   
   Union finalUnion = Union.builder().setNominalEntries(4096).buildUnion();
   finalUnion.update(result);
   System.out.println(finalUnion.getResult().getEstimate());
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org