Class IntRegionBinarySearchKernel

java.lang.Object
io.deephaven.engine.table.impl.sources.regioned.kernel.IntRegionBinarySearchKernel

public class IntRegionBinarySearchKernel extends Object
  • Constructor Details

    • IntRegionBinarySearchKernel

      public IntRegionBinarySearchKernel()
  • Method Details

    • binsearchRangeFilter

      public static RowSet binsearchRangeFilter(@NotNull @NotNull ColumnRegionInt<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, @NotNull @NotNull IntRangeFilter filter)
      Performs a binary search on a sorted column region using bounds from a IntRangeFilter, returning the row keys that satisfy the filter.
      Parameters:
      region - The column region to search.
      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 - A SortColumn representing the sorting order.
      filter - The range filter supplying lower/upper bounds and their inclusive flags.
      Returns:
      A RowSet containing the row keys satisfying the filter.
    • binsearchMatchFilter

      public static RowSet binsearchMatchFilter(@NotNull @NotNull ColumnRegionInt<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, @NotNull @NotNull MatchFilter filter)
      Performs a binary search on a sorted column region for the values of a MatchFilter, returning the row keys that hold one of them. The filter's inverted flag is not applied here; the caller must invert the result itself.
      Parameters:
      region - The column region to search.
      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 - A SortColumn representing the sorting order.
      filter - The match filter supplying the values to find.
      Returns:
      A RowSet containing the row keys holding one of the filter's values.
    • binarySearchMatch

      public static RowSet binarySearchMatch(ColumnRegionInt<?> 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 - A SortColumn object representing the sorting order of the column.
      searchValues - An array of keys to find within the column region.
      Returns:
      A RowSet containing the row keys where the sorted keys were found.
    • binarySearchMinMax

      public static RowSet binarySearchMinMax(@NotNull @NotNull ColumnRegionInt<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, int min, int 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 - A SortColumn object representing the sorting order of the column.
      min - The minimum value of the range.
      max - The maximum value of the range.
      minInc - true if the minimum value is inclusive, false otherwise.
      maxInc - true if the maximum value is inclusive, false otherwise.
      Returns:
      A RowSet containing the row keys where the values were found.
    • binarySearchMin

      public static RowSet binarySearchMin(@NotNull @NotNull ColumnRegionInt<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, int 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 - A SortColumn object representing the sorting order of the column.
      min - The minimum value of the range.
      minInc - true if the minimum value is inclusive, false otherwise.
      Returns:
      A RowSet containing the row keys where the values were found.
    • binarySearchMax

      public static RowSet binarySearchMax(@NotNull @NotNull ColumnRegionInt<?> region, long firstKey, long lastKey, @NotNull @NotNull SortColumn sortColumn, int 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 - A SortColumn object representing the sorting order of the column.
      max - The maximum value of the range.
      maxInc - true if the maximum value is inclusive, false otherwise.
      Returns:
      A RowSet containing the row keys where the values were found.