Class SetOperationCornerCases
java.lang.Object
org.apache.datasketches.thetacommon.SetOperationCornerCases
Simplifies and speeds up set operations by resolving specific corner cases.
- Author:
- Lee Rhodes
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumA not B actionsstatic enumList of corner casesstatic enumIntersection actionsstatic enumList of union actions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcreateCornerCaseId(long thetaLongA, int countA, boolean emptyA, long thetaLongB, int countB, boolean emptyB) Creates the CornerCase IDstatic intsketchStateId(boolean isEmpty, int numRetained, long thetaLong) Returns the sketch state ID
-
Constructor Details
-
SetOperationCornerCases
public SetOperationCornerCases()No argument constructor.
-
-
Method Details
-
createCornerCaseId
public static int createCornerCaseId(long thetaLongA, int countA, boolean emptyA, long thetaLongB, int countB, boolean emptyB) Creates the CornerCase ID- Parameters:
thetaLongA- the theta of A as a longcountA- the count of AemptyA- true if A is emptythetaLongB- the theta of B as a longcountB- the count of BemptyB- true if B is empty- Returns:
- the Corner Case ID
-
sketchStateId
public static int sketchStateId(boolean isEmpty, int numRetained, long thetaLong) Returns the sketch state ID- Parameters:
isEmpty- true if emptynumRetained- the number of items retainedthetaLong- the value of theta as a long- Returns:
- the sketch state ID
-