Package io.deephaven.chunk.util.hashing
Interface ChunkHasher
- All Known Implementing Classes:
BooleanChunkHasher
,ByteChunkHasher
,CharChunkHasher
,DoubleChunkHasher
,FloatChunkHasher
,IntChunkHasher
,LongChunkHasher
,ObjectChunkHasher
,ShortChunkHasher
public interface ChunkHasher
-
Method Summary
Modifier and TypeMethodDescriptionvoid
hashInitial
(Chunk<Values> values, WritableIntChunk<HashCodes> destination) Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.int
hashInitial
(Object value) Hash a boxed object.int
hashUpdate
(int existing, Object value) Update a hash for a boxed object.void
hashUpdate
(Chunk<Values> values, WritableIntChunk<HashCodes> destination) Called for subsequent hash values, updates the hash codes in destination corresponding to values.static ChunkHasher
makeHasher
(ChunkType chunkType) static int
scrambleHash
(int x)
-
Method Details
-
hashInitial
Called for the first (or only) hash value, sets the hash codes in destination corresponding to values.- Parameters:
values
- the values to hashdestination
- the chunk to write hash values into
-
hashUpdate
Called for subsequent hash values, updates the hash codes in destination corresponding to values.- Parameters:
values
- the values to hashdestination
- the chunk to update hash values into
-
hashInitial
Hash a boxed object.- Parameters:
value
- the boxed object to hash- Returns:
- the hashcode, as if you called the chunked version of this function
-
hashUpdate
Update a hash for a boxed object.- Parameters:
existing
- the existing hashcodevalue
- the boxed object to add to the hash code- Returns:
- the hashcode, as if you called the chunked version of this function
-
makeHasher
-
scrambleHash
static int scrambleHash(int x)
-