Package com.illumon.iris.db.v2.hashing
Class DoubleArrayChunkEquals
java.lang.Object
com.illumon.iris.db.v2.hashing.DoubleArrayChunkEquals
- All Implemented Interfaces:
ChunkEquals
public class DoubleArrayChunkEquals extends Object implements ChunkEquals
-
Field Summary
Fields Modifier and Type Field Description static DoubleArrayChunkEquals
INSTANCE
-
Constructor Summary
Constructors Constructor Description DoubleArrayChunkEquals()
-
Method Summary
Modifier and Type Method Description void
andEqual(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
Called for subsequent pair of chunks, if the corresponding destination entry is false, do nothing.void
andEqualLhsPermuted(IntChunk<Attributes.ChunkPositions> lhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.void
andEqualNext(Chunk<? extends Attributes.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.void
andEqualPairs(IntChunk<Attributes.ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Attributes.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.void
andEqualPermuted(IntChunk<Attributes.ChunkPositions> lhsPositions, IntChunk<Attributes.ChunkPositions> rhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
If destination[i] is false do nothing, otherwise, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs[rhsPositions].void
andNotEqual(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
Called for subsequent pair of chunks, if the corresponding destination entry is false, do nothing.static void
equal(Chunk<? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination)
void
equal(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are equal, or false otherwisevoid
equalLhsPermuted(IntChunk<Attributes.ChunkPositions> lhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if lhs[lhsPositions] == rhs.void
equalNext(Chunk<? extends Attributes.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.void
equalPairs(IntChunk<Attributes.ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Attributes.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.void
equalPermuted(IntChunk<Attributes.ChunkPositions> lhsPositions, IntChunk<Attributes.ChunkPositions> rhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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].boolean
equalReduce(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs)
Returns true iff the chunks have the same size() and each corresponding element of the chunk compares equal.static boolean
equalReduce(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs)
boolean
equals(Object lhs, Object rhs)
static int
firstDifference(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs)
static void
notEqual(Chunk<? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination)
void
notEqual(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.Any> rhs, WritableBooleanChunk destination)
Called for the first (or only) pair of chunks, sets the corresponding destination entry to true if the values are not equal, or false otherwisestatic void
notEqual(ObjectChunk<double[],? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination)
static void
notEqual(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs, WritableBooleanChunk destination)
-
Field Details
-
Constructor Details
-
DoubleArrayChunkEquals
public DoubleArrayChunkEquals()
-
-
Method Details
-
equalReduce
public static boolean equalReduce(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs) -
firstDifference
public static int firstDifference(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs) -
notEqual
public static void notEqual(ObjectChunk<double[],? extends Attributes.Any> lhs, ObjectChunk<double[],? extends Attributes.Any> rhs, WritableBooleanChunk destination) -
notEqual
public static void notEqual(ObjectChunk<double[],? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination) -
equalReduce
public boolean equalReduce(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 interfaceChunkEquals
- Parameters:
lhs
- the left-hand side of the comparisonrhs
- the right-hand side of the comparison
-
equal
public void equal(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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
public static void equal(Chunk<? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination) -
equalNext
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 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 Attributes.Any> lhs, Chunk<? extends Attributes.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 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: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 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<Attributes.ChunkPositions> lhsPositions, IntChunk<Attributes.ChunkPositions> rhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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<Attributes.ChunkPositions> lhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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<Attributes.ChunkPositions> lhsPositions, IntChunk<Attributes.ChunkPositions> rhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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<Attributes.ChunkPositions> lhsPositions, Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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 Attributes.Any> lhs, Chunk<? extends Attributes.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 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
public static void notEqual(Chunk<? extends Attributes.Any> lhs, double[] rhs, WritableBooleanChunk destination) -
andNotEqual
public void andNotEqual(Chunk<? extends Attributes.Any> lhs, Chunk<? extends Attributes.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 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<Attributes.ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Attributes.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 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<Attributes.ChunkPositions> chunkPositionsToCheckForEquality, Chunk<? extends Attributes.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 interfaceChunkEquals
- Parameters:
chunkPositionsToCheckForEquality
- the position pairs of interestvaluesChunk
- the chunk of values we are interested indestinations
- the destination chunk to write equality values into
-
equals
- Specified by:
equals
in interfaceChunkEquals
-