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 Summary
Modifier and TypeMethodDescriptionstatic NetChangeKernelvoidnet(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.
-
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, asCompactKernel.compactAndCountleaves them, with parallel counts. On return both inputs are still sorted, and every count is positive.- Parameters:
removes- the values removed, input and outputremoveCounts- the number of times each value inremoveswas removed, input and outputadds- the values added, input and outputaddCounts- the number of times each value inaddswas added, input and output
-
make
-