Interface CompactKernel
- All Known Implementing Classes:
BooleanCompactKernel,ByteCompactKernel,CharCompactKernel,DoubleCompactKernel,FloatCompactKernel,IntCompactKernel,LongCompactKernel,ObjectCompactKernel,ShortCompactKernel
public interface CompactKernel
-
Method Summary
Modifier and TypeMethodDescriptionvoidcompact(WritableChunk<? extends Attributes.Any> values, BooleanChunk<Attributes.Any> retainValues) Compacts values into the front of the chunk, retaining only values where the parallel retainValues chunk has a true value.default voidcompactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts) Sort valuesChunk, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.voidcompactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, boolean countNull) Sort valuesChunk, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.default voidcompactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, IntChunk<Attributes.ChunkPositions> startPositions, WritableIntChunk<Attributes.ChunkLengths> lengths) For each run in valuesChunk, sort it, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.voidcompactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, IntChunk<Attributes.ChunkPositions> startPositions, WritableIntChunk<Attributes.ChunkLengths> lengths, boolean countNull) For each run in valuesChunk, sort it, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.static CompactKernelmakeCompact(ChunkType chunkType)
-
Method Details
-
compact
void compact(WritableChunk<? extends Attributes.Any> values, BooleanChunk<Attributes.Any> retainValues) Compacts values into the front of the chunk, retaining only values where the parallel retainValues chunk has a true value.- Parameters:
values- a chunk of values, input and outputretainValues- the values to retain
-
compactAndCount
default void compactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts) Sort valuesChunk, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts. null values are removed from the chunk.- Parameters:
valueChunk- a chunk of values, input and outputcounts- an output chunk parallel to valueChunk with the number of times a value occurred
-
compactAndCount
void compactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, boolean countNull) Sort valuesChunk, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.- Parameters:
valueChunk- a chunk of values, input and outputcounts- an output chunk parallel to valueChunk with the number of times a value occurredcountNull- if the compaction should count nulls or not
-
compactAndCount
default void compactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, IntChunk<Attributes.ChunkPositions> startPositions, WritableIntChunk<Attributes.ChunkLengths> lengths) For each run in valuesChunk, sort it, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts. null values are removed from the chunk.- Parameters:
valueChunk- a chunk of values, input and outputcounts- an output chunk parallel to valueChunk with the number of times a value occurredstartPositions- the start of each runlengths- the length of each run, input and output
-
compactAndCount
void compactAndCount(WritableChunk<? extends Attributes.Values> valueChunk, WritableIntChunk<Attributes.ChunkLengths> counts, IntChunk<Attributes.ChunkPositions> startPositions, WritableIntChunk<Attributes.ChunkLengths> lengths, boolean countNull) For each run in valuesChunk, sort it, eliminate duplicates, and write the number of times a value occurred into the parallel slot within counts.- Parameters:
valueChunk- a chunk of values, input and outputcounts- an output chunk parallel to valueChunk with the number of times a value occurredstartPositions- the start of each runlengths- the length of each run, input and outputcountNull- if the compaction should count nulls or not
-
makeCompact
-