Interface PermuteKernel


public interface PermuteKernel
  • Method Details

    • makePermuteKernel

      static PermuteKernel makePermuteKernel​(ChunkType chunkType)
    • 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 type
      columnType - the column type
      componentType - 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 outputPositions
      outputPositions - a chunk of positions, parallel to inputValues, that indicates the position in outputValues for the corresponding inputValues value
      outputValues - 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 chunk
      inputValues - a chunk of values, which must be at least as large as the largest value in inputPositions
      outputPositions - a chunk of positions, parallel to inputPositions, that indicates the position in outputValues for the corresponding inputValues value
      outputValues - 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 inputPositions
      inputPositions - a chunk of positions, parallel to outputValues, that indicates the position in inputValues for the corresponding outputValues value
      outputValues - an output chunk, which must have the same size as inputPositions