Interface PermuteKernel
public interface PermuteKernel
-
Method Summary
Modifier and Type Method Description static PermuteKernel
makeDeepPermuteKernel(ChunkType chunkType, Class<?> columnType, Class<?> componentType)
When using Arrays or DbArrays as keys, they must be deep-copied to their destination sources or changes to the underlying values will change out the keys from underneath the operation.static PermuteKernel
makePermuteKernel(ChunkType chunkType)
<T extends Attributes.Any>
voidpermute(Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> outputPositions, WritableChunk<? super T> outputValues)
Permute the inputValues into outputValues according to the positions in outputPositions.<T extends Attributes.Any>
voidpermute(IntChunk<Attributes.ChunkPositions> inputPositions, Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> outputPositions, WritableChunk<? super T> outputValues)
Permute the inputValues into outputValues according to positions in inputPositions and outputPositions.<T extends Attributes.Any>
voidpermuteInput(Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> inputPositions, WritableChunk<? super T> outputValues)
Permute the inputValues into outputValues according to the positions in inputPositions.
-
Method Details
-
makePermuteKernel
-
makeDeepPermuteKernel
static PermuteKernel makeDeepPermuteKernel(ChunkType chunkType, Class<?> columnType, Class<?> componentType)When using Arrays or DbArrays as keys, they must be deep-copied to their destination sources or changes to the underlying values will change out the keys from underneath the operation. This method will do a deep copy for any column times for which is it necessary.- Parameters:
chunkType
- the chunk typecolumnType
- the column typecomponentType
- the column's component type- Returns:
- a
PermuteKernel
-
permute
<T extends Attributes.Any> void permute(Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> outputPositions, WritableChunk<? super T> outputValues)Permute the inputValues into outputValues according to the positions in outputPositions.- Parameters:
inputValues
- a chunk of values, which must have the same size as outputPositionsoutputPositions
- a chunk of positions, parallel to inputValues, that indicates the position in outputValues for the corresponding inputValues valueoutputValues
- an output chunk, which must be at least as big as the largest value in outputPositions
-
permute
<T extends Attributes.Any> void permute(IntChunk<Attributes.ChunkPositions> inputPositions, Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> outputPositions, WritableChunk<? super T> outputValues)Permute the inputValues into outputValues according to positions in inputPositions and outputPositions.outputValues[outputPositions] = inputValues[inputPositions]
- Parameters:
inputPositions
- a chunk of positions that indicates the position in inputValues to copy to the outputValues chunkinputValues
- a chunk of values, which must be at least as large as the largest value in inputPositionsoutputPositions
- a chunk of positions, parallel to inputPositions, that indicates the position in outputValues for the corresponding inputValues valueoutputValues
- an output chunk, which must be at least as big as the largest value in outputPositions
-
permuteInput
<T extends Attributes.Any> void permuteInput(Chunk<? extends T> inputValues, IntChunk<Attributes.ChunkPositions> inputPositions, WritableChunk<? super T> outputValues)Permute the inputValues into outputValues according to the positions in inputPositions.- Parameters:
inputValues
- a chunk of values, which must be at least as big as the largest value in inputPositionsinputPositions
- a chunk of positions, parallel to outputValues, that indicates the position in inputValues for the corresponding outputValues valueoutputValues
- an output chunk, which must have the same size as inputPositions
-