Interface DupCompactKernel

All Superinterfaces:
AutoCloseable, Context, SafeCloseable
All Known Implementing Classes:
ByteDupCompactKernel, ByteReverseDupCompactKernel, CharDupCompactKernel, CharReverseDupCompactKernel, DoubleDupCompactKernel, DoubleReverseDupCompactKernel, FloatDupCompactKernel, FloatReverseDupCompactKernel, IntDupCompactKernel, IntReverseDupCompactKernel, LongDupCompactKernel, LongReverseDupCompactKernel, NullAwareCharDupCompactKernel, NullAwareCharReverseDupCompactKernel, ObjectDupCompactKernel, ObjectReverseDupCompactKernel, ShortDupCompactKernel, ShortReverseDupCompactKernel

public interface DupCompactKernel
extends Context
  • Method Details

    • makeDupCompact

      static DupCompactKernel makeDupCompact​(ChunkType chunkType, boolean reverse)
    • compactDuplicates

      int compactDuplicates​(WritableChunk<? extends Attributes.Any> chunkToCompact, WritableLongChunk<Attributes.KeyIndices> keyIndices)
      Remove all adjacent values from chunkToCompact, except the last value in any adjacent run. The keyIndices are parallel to the chunkToCompact; and when a value is removed from chunkToCompact it is also removed from keyIndices Additionally, verify that the elements are properly ordered; returning the first position of an out of order element.
      Parameters:
      chunkToCompact - the values to remove duplicates from
      keyIndices - the key indices parallel to chunkToCompact
      Returns:
      the first position of an out-of-order element, or -1 if all elements are in order