Class DoubleFindRunsKernel

java.lang.Object
io.deephaven.engine.table.impl.sort.findruns.DoubleFindRunsKernel

public class DoubleFindRunsKernel extends Object
  • Constructor Details

    • DoubleFindRunsKernel

      public DoubleFindRunsKernel()
  • Method Details

    • findRunsSingles

      public static void findRunsSingles(@NotNull @NotNull DoubleChunk<? extends Any> sortedValues, @NotNull @NotNull WritableIntChunk<ChunkPositions> offsetsOut, @NotNull @NotNull WritableIntChunk<ChunkLengths> lengthsOut)
      Find runs of identical values in a sorted chunk. If a single value exists, it is included as run of length 1.
      Parameters:
      sortedValues - a chunk of sorted values
      offsetsOut - an output chunk, with offsets of starting locations that a run occurred
      lengthsOut - an output chunk, parallel to offsetsOut, with the lengths of found runs
    • findRuns

      public static void findRuns(@NotNull @NotNull DoubleChunk<? extends Any> sortedValues, @NotNull @NotNull IntChunk<ChunkPositions> offsetsIn, @NotNull @NotNull IntChunk<ChunkLengths> lengthsIn, @NotNull @NotNull WritableIntChunk<ChunkPositions> offsetsOut, @NotNull @NotNull WritableIntChunk<ChunkLengths> lengthsOut)
      Find runs of two or more identical values in a sorted chunk. This is used as part of an overall sort, after the timsort (or other sorting) kernel to identify the runs that must be sorted according to secondary keys.
      Parameters:
      sortedValues - a chunk of sorted values
      offsetsIn - the offsets within the chunk to check for runs
      lengthsIn - the lengths parallel to offsetsIn for run checking
      offsetsOut - an output chunk, with offsets of starting locations that a run occurred
      lengthsOut - an output chunk, parallel to offsetsOut, with the lengths of found runs Note, that lengthsIn must contain values greater than 1, and lengthsOut additionally only contain values greater than one
    • compactRuns

      public static int compactRuns(@NotNull @NotNull WritableDoubleChunk<? extends Any> sortedValues, @NotNull @NotNull IntChunk<ChunkPositions> offsetsIn)
    • getInstance

      public static FindRunsKernel getInstance()