@Generated(date="2023-04-24T17:14:46+0800",
value="KTypeScatterSet.java")
public class IntScatterSet
extends IntHashSet
IntHashSet but does not implement per-instance key mixing
strategy and uses a simpler (faster) bit distribution function.
Note: read about important differences between hash and scatter sets.
IntHashSet,
HPPC interfaces diagramIntHashSet.EntryIteratorassigned, hasEmptyKey, keyMixer, keys, loadFactor, mask, orderMixer, resizeAt| Constructor and Description |
|---|
IntScatterSet()
New instance with sane defaults.
|
IntScatterSet(int expectedElements)
New instance with sane defaults.
|
IntScatterSet(int expectedElements,
double loadFactor)
New instance with sane defaults.
|
| Modifier and Type | Method and Description |
|---|---|
static IntScatterSet |
from(int... elements)
Create a set from a variable number of arguments or an array of
int. |
protected int |
hashKey(int key)
Returns a hash code for the given key.
|
add, addAll, addAll, addAll, allocateBuffers, allocateThenInsertThenRehash, clear, clone, contains, ensureCapacity, equals, forEach, forEach, hashCode, indexExists, indexGet, indexInsert, indexOf, indexReplace, isEmpty, iterator, rehash, release, remove, removeAll, removeAll, shiftConflictingKeys, size, toArray, verifyLoadFactor, visualizeKeyDistributionremoveAll, retainAll, retainAll, toStringfinalize, getClass, notify, notifyAll, wait, wait, waitremoveAll, retainAll, retainAllpublic IntScatterSet()
public IntScatterSet(int expectedElements)
public IntScatterSet(int expectedElements,
double loadFactor)
protected int hashKey(int key)
IntHashSetIntHashSet.keyMixer
to differentiate hash order of keys between hash containers. Helps
alleviate problems resulting from linear conflict resolution in open
addressing.
The output from this function should evenly distribute keys across the
entire integer range.hashKey in class IntHashSetpublic static IntScatterSet from(int... elements)
int. The elements are copied from the argument to the
internal buffer.