Package io.deephaven.chunk.util.hashing
Class ObjectChunkDeepEquals
java.lang.Object
io.deephaven.chunk.util.hashing.ObjectChunkDeepEquals
- All Implemented Interfaces:
ChunkEquals
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidCalled for subsequent pair of chunks, if the corresponding destination entry is false, do nothing.voidandEqualLhsPermuted(IntChunk<ChunkPositions> lhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.voidandEqualNext(Chunk<? extends Any> chunk, WritableBooleanChunk destination) For each pair of indices i and i + 1 in chunk; if destination[i] is false do nothing, otherwise write true to destination[i] if they are equal.voidandEqualPairs(IntChunk<ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Any> valuesChunk, WritableBooleanChunk destinations) Compares valuesChunk[chunkPositionsToCheckForEquality[pp * 2]] and valuesChunk[chunkPositionsToCheckForEquality[pp * 2 + 1]] for each even/odd pair in chunkPositionsToCheckForEquality and writes the result to destinations.voidandEqualPermuted(IntChunk<ChunkPositions> lhsPositions, IntChunk<ChunkPositions> rhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].voidandNotEqual(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Called for subsequent pair of chunks, if the corresponding destination entry is false, do nothing.voidCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are equal, or false otherwisestatic voidequal(Chunk<? extends Any> lhs, Object rhs, WritableBooleanChunk destination) voidequalLhsPermuted(IntChunk<ChunkPositions> lhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.voidequalNext(Chunk<? extends Any> chunk, WritableBooleanChunk destination) For each pair of indices i and i + 1 in chunk; write true to destination[i] if they are equal, otherwise write false.voidequalPairs(IntChunk<ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Any> valuesChunk, WritableBooleanChunk destinations) Compares valuesChunk[chunkPositionsToCheckForEquality[pp * 2]] and valuesChunk[chunkPositionsToCheckForEquality[pp * 2 + 1]] for each even/odd pair in chunkPositionsToCheckForEquality and writes the result to destinations.voidequalPermuted(IntChunk<ChunkPositions> lhsPositions, IntChunk<ChunkPositions> rhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].booleanequalReduce(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs) Returns true iff the chunks have the same size() and each corresponding element of the chunk compares equal.static booleanequalReduce(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs) static intfirstDifference(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs) voidCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are not equal, or false otherwisestatic voidnotEqual(Chunk<? extends Any> lhs, Object rhs, WritableBooleanChunk destination) static voidnotEqual(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs, WritableBooleanChunk destination) static voidnotEqual(ObjectChunk<Object, ? extends Any> lhs, Object rhs, WritableBooleanChunk destination)
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
ObjectChunkDeepEquals
public ObjectChunkDeepEquals()
-
-
Method Details
-
equalReduce
public static boolean equalReduce(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs) -
firstDifference
public static int firstDifference(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs) -
notEqual
public static void notEqual(ObjectChunk<Object, ? extends Any> lhs, ObjectChunk<Object, ? extends Any> rhs, WritableBooleanChunk destination) -
notEqual
public static void notEqual(ObjectChunk<Object, ? extends Any> lhs, Object rhs, WritableBooleanChunk destination) -
equalReduce
Description copied from interface:ChunkEqualsReturns true iff the chunks have the same size() and each corresponding element of the chunk compares equal.- Specified by:
equalReducein interfaceChunkEquals- Parameters:
lhs- the left-hand side of the comparisonrhs- the right-hand side of the comparison
-
equal
public void equal(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are equal, or false otherwise- Specified by:
equalin interfaceChunkEquals- Parameters:
lhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
equal
-
equalNext
Description copied from interface:ChunkEqualsFor each pair of indices i and i + 1 in chunk; write true to destination[i] if they are equal, otherwise write false.- Specified by:
equalNextin interfaceChunkEquals- Parameters:
chunk- the chunk to compare subsequent values indestination- the chunk to write equality values into, size is chunk.size() - 1
-
andEqual
public void andEqual(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for subsequent pair of chunks, if the corresponding destination entry is false, do nothing. If true, then set to false if the corresponding values are not equal.- Specified by:
andEqualin interfaceChunkEquals- Parameters:
lhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
andEqualNext
Description copied from interface:ChunkEqualsFor each pair of indices i and i + 1 in chunk; if destination[i] is false do nothing, otherwise write true to destination[i] if they are equal.- Specified by:
andEqualNextin interfaceChunkEquals- Parameters:
chunk- the chunk to compare subsequent values indestination- the chunk to write equality values into, size is chunk.size() - 1
-
equalPermuted
public void equalPermuted(IntChunk<ChunkPositions> lhsPositions, IntChunk<ChunkPositions> rhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].- Specified by:
equalPermutedin interfaceChunkEquals- Parameters:
lhsPositions- the positions within left-hand side of the comparisonrhsPositions- the positions within the right-hand side of the comparisonlhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
equalLhsPermuted
public void equalLhsPermuted(IntChunk<ChunkPositions> lhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.- Specified by:
equalLhsPermutedin interfaceChunkEquals- Parameters:
lhsPositions- the positions within left-hand side of the comparisonlhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
andEqualPermuted
public void andEqualPermuted(IntChunk<ChunkPositions> lhsPositions, IntChunk<ChunkPositions> rhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsIf destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].- Specified by:
andEqualPermutedin interfaceChunkEquals- Parameters:
lhsPositions- the positions within left-hand side of the comparisonrhsPositions- the positions within the right-hand side of the comparisonlhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
andEqualLhsPermuted
public void andEqualLhsPermuted(IntChunk<ChunkPositions> lhsPositions, Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsIf destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.- Specified by:
andEqualLhsPermutedin interfaceChunkEquals- Parameters:
lhsPositions- the positions within left-hand side of the comparisonlhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
notEqual
public void notEqual(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are not equal, or false otherwise- Specified by:
notEqualin interfaceChunkEquals- Parameters:
lhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
notEqual
-
andNotEqual
public void andNotEqual(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination) Description copied from interface:ChunkEqualsCalled for subsequent pair of chunks, if the corresponding destination entry is false, do nothing. If true, then set to false if the corresponding values are equal.- Specified by:
andNotEqualin interfaceChunkEquals- Parameters:
lhs- the left-hand side of the comparisonrhs- the right-hand side of the comparisondestination- the chunk to write equality values into
-
equalPairs
public void equalPairs(IntChunk<ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Any> valuesChunk, WritableBooleanChunk destinations) Description copied from interface:ChunkEqualsCompares valuesChunk[chunkPositionsToCheckForEquality[pp * 2]] and valuesChunk[chunkPositionsToCheckForEquality[pp * 2 + 1]] for each even/odd pair in chunkPositionsToCheckForEquality and writes the result to destinations.- Specified by:
equalPairsin interfaceChunkEquals- Parameters:
chunkPositionsToCheckForEquality- the position pairs of interestvaluesChunk- the chunk of values we are interested indestinations- the destination chunk to write equality values into
-
andEqualPairs
public void andEqualPairs(IntChunk<ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Any> valuesChunk, WritableBooleanChunk destinations) Description copied from interface:ChunkEqualsCompares valuesChunk[chunkPositionsToCheckForEquality[pp * 2]] and valuesChunk[chunkPositionsToCheckForEquality[pp * 2 + 1]] for each even/odd pair in chunkPositionsToCheckForEquality and writes the result to destinations.- Specified by:
andEqualPairsin interfaceChunkEquals- Parameters:
chunkPositionsToCheckForEquality- the position pairs of interestvaluesChunk- the chunk of values we are interested indestinations- the destination chunk to write equality values into
-