Class LongChunkEquals

java.lang.Object
io.deephaven.chunk.util.hashing.LongChunkEquals
All Implemented Interfaces:
ChunkEquals

public class LongChunkEquals extends Object implements ChunkEquals
  • Field Details

  • Constructor Details

    • LongChunkEquals

      public LongChunkEquals()
  • Method Details

    • equalReduce

      public static boolean equalReduce(LongChunk<? extends Any> lhs, LongChunk<? extends Any> rhs)
    • firstDifference

      public static int firstDifference(LongChunk<? extends Any> lhs, LongChunk<? extends Any> rhs)
    • notEqual

      public static void notEqual(LongChunk<? extends Any> lhs, LongChunk<? extends Any> rhs, WritableBooleanChunk destination)
    • notEqual

      public static void notEqual(LongChunk<? extends Any> lhs, long rhs, WritableBooleanChunk destination)
    • equalReduce

      public boolean equalReduce(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs)
      Description copied from interface: ChunkEquals
      Returns true iff the chunks have the same size() and each corresponding element of the chunk compares equal.
      Specified by:
      equalReduce in interface ChunkEquals
      Parameters:
      lhs - the left-hand side of the comparison
      rhs - 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: ChunkEquals
      Called 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:
      equal in interface ChunkEquals
      Parameters:
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - the chunk to write equality values into
    • equal

      public static void equal(Chunk<? extends Any> lhs, long rhs, WritableBooleanChunk destination)
    • equalNext

      public void equalNext(Chunk<? extends Any> chunk, WritableBooleanChunk destination)
      Description copied from interface: ChunkEquals
      For each pair of indices i and i + 1 in chunk; write true to destination[i] if they are equal, otherwise write false.
      Specified by:
      equalNext in interface ChunkEquals
      Parameters:
      chunk - the chunk to compare subsequent values in
      destination - 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: ChunkEquals
      Called 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:
      andEqual in interface ChunkEquals
      Parameters:
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - the chunk to write equality values into
    • andEqualNext

      public void andEqualNext(Chunk<? extends Any> chunk, WritableBooleanChunk destination)
      Description copied from interface: ChunkEquals
      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.
      Specified by:
      andEqualNext in interface ChunkEquals
      Parameters:
      chunk - the chunk to compare subsequent values in
      destination - 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: ChunkEquals
      Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].
      Specified by:
      equalPermuted in interface ChunkEquals
      Parameters:
      lhsPositions - the positions within left-hand side of the comparison
      rhsPositions - the positions within the right-hand side of the comparison
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - 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: ChunkEquals
      Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.
      Specified by:
      equalLhsPermuted in interface ChunkEquals
      Parameters:
      lhsPositions - the positions within left-hand side of the comparison
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - 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: ChunkEquals
      If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].
      Specified by:
      andEqualPermuted in interface ChunkEquals
      Parameters:
      lhsPositions - the positions within left-hand side of the comparison
      rhsPositions - the positions within the right-hand side of the comparison
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - 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: ChunkEquals
      If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.
      Specified by:
      andEqualLhsPermuted in interface ChunkEquals
      Parameters:
      lhsPositions - the positions within left-hand side of the comparison
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - 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: ChunkEquals
      Called 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:
      notEqual in interface ChunkEquals
      Parameters:
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - the chunk to write equality values into
    • notEqual

      public static void notEqual(Chunk<? extends Any> lhs, long rhs, WritableBooleanChunk destination)
    • andNotEqual

      public void andNotEqual(Chunk<? extends Any> lhs, Chunk<? extends Any> rhs, WritableBooleanChunk destination)
      Description copied from interface: ChunkEquals
      Called 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:
      andNotEqual in interface ChunkEquals
      Parameters:
      lhs - the left-hand side of the comparison
      rhs - the right-hand side of the comparison
      destination - the chunk to write equality values into
    • equalPairs

      public void equalPairs(IntChunk<ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Any> valuesChunk, WritableBooleanChunk destinations)
      Description copied from interface: ChunkEquals
      Compares 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:
      equalPairs in interface ChunkEquals
      Parameters:
      chunkPositionsToCheckForEquality - the position pairs of interest
      valuesChunk - the chunk of values we are interested in
      destinations - 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: ChunkEquals
      Compares 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:
      andEqualPairs in interface ChunkEquals
      Parameters:
      chunkPositionsToCheckForEquality - the position pairs of interest
      valuesChunk - the chunk of values we are interested in
      destinations - the destination chunk to write equality values into