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
Modifier and TypeClassDescriptionstatic enum
A not B actionsstatic enum
List of corner casesstatic enum
Intersection actionsstatic enum
List of union actions -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
createCornerCaseId
(long thetaLongA, int countA, boolean emptyA, long thetaLongB, int countB, boolean emptyB) Creates the CornerCase IDstatic int
sketchStateId
(boolean isEmpty, int numRetained, long thetaLong) Returns the sketch state ID
-
Constructor Details
-
SetOperationCornerCases
public SetOperationCornerCases()
-
-
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
-