java.lang.Object
com.dynatrace.hash4j.distinctcount.DistinctCountUtil
A utility functions for distinct counting.
-
Method Summary
Modifier and TypeMethodDescriptionstatic intdeduplicateTokens(int[] tokens, int fromIndexIncl, int toIndexExcl) Utility function for deduplicating hash tokens.
-
Method Details
-
deduplicateTokens
public static int deduplicateTokens(int[] tokens, int fromIndexIncl, int toIndexExcl) Utility function for deduplicating hash tokens.The hash tokens in the given array with indices in the range [fromIndexIncl, toIndexExcl) are deduplicated. The resulting sorted and deduplicated hash tokens can finally be found at indices that are greater than or equal to fromIndexIncl and that are smaller than the returned value.
- Parameters:
tokens- – the array of hash tokens to be deduplicatedfromIndexIncl- the index of the first element, inclusive, to be deduplicatedtoIndexExcl- the index of the last element, exclusive, to be deduplicated- Returns:
- the exclusive upper bound index of deduplicated hash values
-