Package io.deephaven.engine.rowset.impl
Class RowSetUtils
java.lang.Object
io.deephaven.engine.rowset.impl.RowSetUtils
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic interface -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic LogOutputappend(LogOutput logOutput, RowSet.RangeIterator it) static voidfillKeyIndicesChunk(RowSet index, WritableLongChunk<? super OrderedRowKeys> chunkToFill) static voidfillKeyRangesChunk(RowSet index, WritableLongChunk<OrderedRowKeyRanges> chunkToFill) static voidforAllInvertedLongRanges(RowSet sourceRowSet, RowSet destRowSet, LongRangeConsumer lrc) This is equivalent to `sourceRowSet.invert(destRowSet).forAllRowKeyRanges(lrc)`, but requires O(1) space.static longrangeSearch(long begin, long end, RowSetUtils.Comparator comp) Look for the biggest value of i that satisfies begin <= i <= end and comp.directionToTargetFrom(i) > 0, or some value that satisfies comp.directionToTargetFrom(i) == 0.
-
Constructor Details
-
RowSetUtils
public RowSetUtils()
-
-
Method Details
-
fillKeyIndicesChunk
public static void fillKeyIndicesChunk(RowSet index, WritableLongChunk<? super OrderedRowKeys> chunkToFill) -
fillKeyRangesChunk
public static void fillKeyRangesChunk(RowSet index, WritableLongChunk<OrderedRowKeyRanges> chunkToFill) -
append
-
rangeSearch
Look for the biggest value of i that satisfies begin <= i <= end and comp.directionToTargetFrom(i) > 0, or some value that satisfies comp.directionToTargetFrom(i) == 0.- Parameters:
begin- The beginning of the range (inclusive)end- The end of the range (inclusive)comp- a Comparator.- Returns:
- the last position i inside the provided range that satisfies comp.directionToTargetFrom(i) > 0, or some position that satisfies comp.directionToTargetFrom(i) == 0.
-
forAllInvertedLongRanges
public static void forAllInvertedLongRanges(RowSet sourceRowSet, RowSet destRowSet, LongRangeConsumer lrc) This is equivalent to `sourceRowSet.invert(destRowSet).forAllRowKeyRanges(lrc)`, but requires O(1) space. Note that coalescing adjacent position-space runs enables callers to make minimal System.arraycopy calls.- Parameters:
sourceRowSet- RowSet to find the destRowSet keys in - ranges in the callback will be on this RowSetdestRowSet- RowSet values to look for within sourceRowSetlrc- consumer to handle each inverted range that is encountered
-