leerho commented on code in PR #155:
URL: https://github.com/apache/datasketches-rust/pull/155#discussion_r3651408519


##########
datasketches/src/theta/a_not_b.rs:
##########


Review Comment:
   **a_not_b** **is** a set difference.  However the name **a_not_b** is a 
mnemonic that tells you the direction of the difference.  
   
   In the math of boolean logic one would write 
   
   A \ B := A AND NOT B = **$A \cup !B$** 
   or
   B \ A := B AND NOT A = **$B \cup !A$**
   
   Where "\\" is the difference operator.  
   Note that A \ B != B \ A !
   
   Although C++ allows user defined operators most languages do not. To call 
the difference function, we need to indicate the direction. We chose to do it 
by the position of the arguments, and the name of the function is a mnemonic of 
the direction.
   
   Sketch result a_not_b(Sketch A, Sketch B);



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to