Class ByteByteTimsortDescendingKernel
java.lang.Object
io.deephaven.engine.table.impl.sort.timsort.ByteByteTimsortDescendingKernel
This implements a timsort kernel for Bytes.
bugs.python.org and Wikipedia do a decent job of describing the algorithm.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
ByteByteTimsortDescendingKernel.ByteByteSortKernelContext<SORT_VALUES_ATTR extends Any,
PERMUTE_VALUES_ATTR extends Any> -
Method Summary
Modifier and TypeMethodDescriptionstatic <SORT_VALUES_ATTR extends Any,
PERMUTE_VALUES_ATTR extends Any>
ByteByteTimsortDescendingKernel.ByteByteSortKernelContext<SORT_VALUES_ATTR,PERMUTE_VALUES_ATTR> createContext
(int size) sort
(ByteByteTimsortDescendingKernel.ByteByteSortKernelContext<SORT_VALUES_ATTR, PERMUTE_VALUES_ATTR> context, WritableByteChunk<PERMUTE_VALUES_ATTR> valuesToPermute, WritableByteChunk<SORT_VALUES_ATTR> valuesToSort) Sort the values in valuesToSort permuting the valuesToPermute chunk in the same way.
-
Method Details
-
createContext
public static <SORT_VALUES_ATTR extends Any,PERMUTE_VALUES_ATTR extends Any> ByteByteTimsortDescendingKernel.ByteByteSortKernelContext<SORT_VALUES_ATTR,PERMUTE_VALUES_ATTR> createContext(int size) -
sort
public static <SORT_VALUES_ATTR extends Any,PERMUTE_VALUES_ATTR extends Any> void sort(ByteByteTimsortDescendingKernel.ByteByteSortKernelContext<SORT_VALUES_ATTR, PERMUTE_VALUES_ATTR> context, WritableByteChunk<PERMUTE_VALUES_ATTR> valuesToPermute, WritableByteChunk<SORT_VALUES_ATTR> valuesToSort) Sort the values in valuesToSort permuting the valuesToPermute chunk in the same way.The offsetsIn chunk is contains the offset of runs to sort in valuesToPermute; and the lengthsIn contains the length of the runs. This allows the kernel to be used for a secondary column sort, chaining it together with fewer runs sorted on each pass.
-