Class CharRegionBinarySearchKernel
java.lang.Object
io.deephaven.engine.table.impl.sources.regioned.kernel.CharRegionBinarySearchKernel
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic RowSetbinarySearchMatch(ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull SortColumn sortColumn, @NotNull Object[] searchValues) Performs a binary search on a given column region to find the positions (row keys) of specified keys.static RowSetbinarySearchMax(@NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull SortColumn sortColumn, char max, boolean maxInc) Performs a binary search on a given column region to find the positions (row keys) of values less than a specified maximum.static RowSetbinarySearchMin(@NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull SortColumn sortColumn, char min, boolean minInc) Performs a binary search on a given column region to find the positions (row keys) of values greater than a specified minimum.static RowSetbinarySearchMinMax(@NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull SortColumn sortColumn, char min, char max, boolean minInc, boolean maxInc) Performs a binary search on a given column region to find the positions (row keys) of values within a specified range.
-
Constructor Details
-
CharRegionBinarySearchKernel
public CharRegionBinarySearchKernel()
-
-
Method Details
-
binarySearchMatch
public static RowSet binarySearchMatch(ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, @NotNull @NotNull Object[] searchValues) Performs a binary search on a given column region to find the positions (row keys) of specified keys. The method returns the RowSet containing the matched row keys.- Parameters:
region- The column region in which the search will be performed.firstKey- The first key in the column region to consider for the search.lastKey- The last key in the column region to consider for the search.sortColumn- ASortColumnobject representing the sorting order of the column.searchValues- An array of keys to find within the column region.- Returns:
- A
RowSetcontaining the row keys where the sorted keys were found.
-
binarySearchMinMax
public static RowSet binarySearchMinMax(@NotNull @NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, char min, char max, boolean minInc, boolean maxInc) Performs a binary search on a given column region to find the positions (row keys) of values within a specified range.- Parameters:
region- The column region in which the search will be performed.firstKey- The first key in the column region to consider for the search.lastKey- The last key in the column region to consider for the search.sortColumn- ASortColumnobject representing the sorting order of the column.min- The minimum value of the range.max- The maximum value of the range.minInc-trueif the minimum value is inclusive,falseotherwise.maxInc-trueif the maximum value is inclusive,falseotherwise.- Returns:
- A
RowSetcontaining the row keys where the values were found.
-
binarySearchMin
public static RowSet binarySearchMin(@NotNull @NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, char min, boolean minInc) Performs a binary search on a given column region to find the positions (row keys) of values greater than a specified minimum.- Parameters:
region- The column region in which the search will be performed.firstKey- The first key in the column region to consider for the search.lastKey- The last key in the column region to consider for the search.sortColumn- ASortColumnobject representing the sorting order of the column.min- The minimum value of the range.minInc-trueif the minimum value is inclusive,falseotherwise.- Returns:
- A
RowSetcontaining the row keys where the values were found.
-
binarySearchMax
public static RowSet binarySearchMax(@NotNull @NotNull ColumnRegionChar<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, char max, boolean maxInc) Performs a binary search on a given column region to find the positions (row keys) of values less than a specified maximum.- Parameters:
region- The column region in which the search will be performed.firstKey- The first key in the column region to consider for the search.lastKey- The last key in the column region to consider for the search.sortColumn- ASortColumnobject representing the sorting order of the column.max- The maximum value of the range.maxInc-trueif the maximum value is inclusive,falseotherwise.- Returns:
- A
RowSetcontaining the row keys where the values were found.
-