Interface NetChangeKernel

All Known Implementing Classes:
ByteNetChangeKernel, CharNetChangeKernel, DoubleNetChangeKernel, FloatNetChangeKernel, IntNetChangeKernel, LongNetChangeKernel, ObjectNetChangeKernel, ShortNetChangeKernel

public interface NetChangeKernel
Nets the values removed from a bucket against the values added to it, so that a value both removed and added is neither removed from nor inserted into the bucket's sets.
  • Method Details

    • net

      void net(WritableChunk<Values> removes, WritableIntChunk<ChunkLengths> removeCounts, WritableChunk<Values> adds, WritableIntChunk<ChunkLengths> addCounts)
      Subtract the common occurrences of each value from both inputs, then drop the values whose count reaches zero. Both inputs must be sorted and free of duplicates, as CompactKernel.compactAndCount leaves them, with parallel counts. On return both inputs are still sorted, and every count is positive.
      Parameters:
      removes - the values removed, input and output
      removeCounts - the number of times each value in removes was removed, input and output
      adds - the values added, input and output
      addCounts - the number of times each value in adds was added, input and output
    • make

      static NetChangeKernel make(ChunkType chunkType)