Class IntersectionResult
java.lang.Object
org.apache.commons.text.similarity.IntersectionResult
Represents the intersection result between two sets.
Stores the size of set A, set B and the intersection of A and B
(|A ∩ B|
).
This class is immutable.
- Since:
- 1.7
- See Also:
-
Constructor Summary
ConstructorDescriptionIntersectionResult
(int sizeA, int sizeB, int intersection) Constructs the results for an intersection between two sets. -
Method Summary
-
Constructor Details
-
IntersectionResult
Constructs the results for an intersection between two sets.- Parameters:
sizeA
- the size of set A (|A|
)sizeB
- the size of set B (|B|
)intersection
- the size of the intersection of A and B (|A ∩ B|
)- Throws:
IllegalArgumentException
- if the sizes are negative or the intersection is greater than the minimum of the two set sizes
-
-
Method Details
-
equals
-
getIntersection
Gets the size of the intersection between set A and B.- Returns:
|A ∩ B|
-
getSizeA
Gets the size of set A.- Returns:
- |A|
-
getSizeB
Gets the size of set B.- Returns:
- |B|
-
hashCode
-
toString
-