Class FloatColumnBinarySearchKernel

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

public class FloatColumnBinarySearchKernel extends Object
  • Constructor Details

    • FloatColumnBinarySearchKernel

      public FloatColumnBinarySearchKernel()
  • Method Details

    • binsearchRangeFilter

      public static RowSet binsearchRangeFilter(@NotNull @NotNull ElementSource<?> source, @NotNull @NotNull RowSet selection, @NotNull @NotNull SortColumn sortColumn, @NotNull @NotNull FloatRangeFilter filter, boolean usePrev)
      Performs a binary search on a sorted ElementSource using bounds from a FloatRangeFilter, returning the row keys that satisfy the filter.
      Parameters:
      source - The element source to search.
      selection - The RowSet defining which rows are populated and the order in which they are searched.
      sortColumn - A SortColumn representing the sorting order.
      filter - The range filter supplying lower/upper bounds and their inclusive flags.
      usePrev - If true, uses previous values instead of current values.
      Returns:
      A RowSet containing the row keys satisfying the filter.
    • binarySearchMatch

      public static RowSet binarySearchMatch(@NotNull @NotNull ElementSource<?> source, @NotNull @NotNull RowSet selection, @NotNull @NotNull SortColumn sortColumn, @NotNull @NotNull Object[] searchValues, boolean usePrev)
      Performs a binary search on a given sorted ElementSource to find the row keys from a provided RowSet that pass a range or match filter. The method returns the RowSet containing the matched row keys.

      The binary search is performed over the positions defined by selection. RowSet.get(long) is used to map positions to row keys, ensuring O(log n) performance even when the row key space is sparse.

      Parameters:
      source - The element source in which the search will be performed.
      selection - The RowSet defining which rows are populated and the order in which they are searched.
      sortColumn - A SortColumn object representing the sorting order of the column.
      searchValues - An array of keys to find within the source.
      usePrev - If true, the search will use the previous values (getPrevFloat) instead of current values (getFloat).
      Returns:
      A RowSet containing the row keys where the sorted keys were found.
    • binarySearchMinMax

      public static RowSet binarySearchMinMax(@NotNull @NotNull ElementSource<?> source, @NotNull @NotNull RowSet selection, @NotNull @NotNull SortColumn sortColumn, float min, float max, boolean minInc, boolean maxInc, boolean usePrev)
      Performs a binary search on a given sorted ElementSource to find the positions (row keys) of values within a specified range.

      The binary search is performed over the positions defined by selection. RowSet.get(long) is used to map positions to row keys, ensuring O(log n) performance even when the row key space is sparse.

      Parameters:
      source - The element source in which the search will be performed.
      selection - The RowSet defining which rows are populated and the order in which they are searched.
      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.
      usePrev - If true, the search will use the previous values (getPrevFloat) instead of current values (getFloat).
      Returns:
      A RowSet containing the row keys where the values were found.
    • binarySearchMin

      public static RowSet binarySearchMin(@NotNull @NotNull ElementSource<?> source, @NotNull @NotNull RowSet selection, @NotNull @NotNull SortColumn sortColumn, float min, boolean minInc, boolean usePrev)
      Performs a binary search on a given sorted ElementSource to find the positions (row keys) of values greater than a specified minimum.

      The binary search is performed over the positions defined by selection. RowSet.get(long) is used to map positions to row keys, ensuring O(log n) performance even when the row key space is sparse.

      Parameters:
      source - The element source in which the search will be performed.
      selection - The RowSet defining which rows are populated and the order in which they are searched.
      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.
      usePrev - If true, the search will use the previous values (getPrevFloat) instead of current values (getFloat).
      Returns:
      A RowSet containing the row keys where the values were found.
    • binarySearchMax

      public static RowSet binarySearchMax(@NotNull @NotNull ElementSource<?> source, @NotNull @NotNull RowSet selection, @NotNull @NotNull SortColumn sortColumn, float max, boolean maxInc, boolean usePrev)
      Performs a binary search on a given sorted ElementSource to find the positions (row keys) of values less than a specified maximum.

      The binary search is performed over the positions defined by selection. RowSet.get(long) is used to map positions to row keys, ensuring O(log n) performance even when the row key space is sparse.

      Parameters:
      source - The element source in which the search will be performed.
      selection - The RowSet defining which rows are populated and the order in which they are searched.
      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.
      usePrev - If true, the search will use the previous values (getPrevFloat) instead of current values (getFloat).
      Returns:
      A RowSet containing the row keys where the values were found.