Interface PartitioningFeature<T>
-
- All Known Implementing Classes:
ItemsSketch,ItemsSketchSortedView,KllItemsSketch,KllItemsSketchSortedView
public interface PartitioningFeature<T>This enables the special functions for performing efficient partitioning of massive data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default GenericPartitionBoundaries<T>getPartitionBoundaries(int numEquallySized)This method returns an instance ofGenericPartitionBoundarieswhich provides sufficient information for the user to create the given number of equally sized partitions, where "equally sized" refers to an approximately equal number of items per partition.GenericPartitionBoundaries<T>getPartitionBoundaries(int numEquallySized, QuantileSearchCriteria searchCrit)This method returns an instance ofGenericPartitionBoundarieswhich provides sufficient information for the user to create the given number of equally sized partitions, where "equally sized" refers to an approximately equal number of items per partition.
-
-
-
Method Detail
-
getPartitionBoundaries
default GenericPartitionBoundaries<T> getPartitionBoundaries(int numEquallySized)
This method returns an instance ofGenericPartitionBoundarieswhich provides sufficient information for the user to create the given number of equally sized partitions, where "equally sized" refers to an approximately equal number of items per partition.This method is equivalent to
getPartitionBoundaries(numEquallySized, INCLUSIVE).- Parameters:
numEquallySized- an integer that specifies the number of equally sized partitions betweengetMinItem()andgetMaxItem(). This must be a positive integer greater than zero.- A 1 will return: minItem, maxItem.
- A 2 will return: minItem, median quantile, maxItem.
- Etc.
- Returns:
- an instance of
GenericPartitionBoundaries. - Throws:
IllegalArgumentException- if sketch is empty.IllegalArgumentException- if numEquallySized is less than 1.
-
getPartitionBoundaries
GenericPartitionBoundaries<T> getPartitionBoundaries(int numEquallySized, QuantileSearchCriteria searchCrit)
This method returns an instance ofGenericPartitionBoundarieswhich provides sufficient information for the user to create the given number of equally sized partitions, where "equally sized" refers to an approximately equal number of items per partition.- Parameters:
numEquallySized- an integer that specifies the number of equally sized partitions betweengetMinItem()andgetMaxItem(). This must be a positive integer greater than zero.- A 1 will return: minItem, maxItem.
- A 2 will return: minItem, median quantile, maxItem.
- Etc.
searchCrit- If INCLUSIVE, all the returned quantiles are the upper boundaries of the equally sized partitions with the exception of the lowest returned quantile, which is the lowest boundary of the lowest ranked partition. If EXCLUSIVE, all the returned quantiles are the lower boundaries of the equally sized partitions with the exception of the highest returned quantile, which is the upper boundary of the highest ranked partition.- Returns:
- an instance of
GenericPartitionBoundaries. - Throws:
IllegalArgumentException- if sketch is empty.IllegalArgumentException- if numEquallySized is less than 1.
-
-