Interface PermuteKernel


public interface PermuteKernel
  • Method Details

    • makePermuteKernel

      static PermuteKernel makePermuteKernel(ChunkType chunkType)
    • permute

      <T extends Any> void permute(Chunk<? extends T> inputValues, IntChunk<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 Any> void permute(IntChunk<ChunkPositions> inputPositions, Chunk<? extends T> inputValues, IntChunk<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 Any> void permuteInput(Chunk<? extends T> inputValues, IntChunk<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