Preallocable, ShortCollection, ShortContainer, ShortLookupContainer, ShortSet, java.lang.Iterable<ShortCursor>@Generated(date="2018-05-21T12:24:05+0200", value="KTypeScatterSet.java") public class ShortScatterSet extends ShortHashSet
ShortHashSet 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.
ShortHashSet,
HPPC interfaces diagramShortHashSet.EntryIteratorassigned, hasEmptyKey, keyMixer, keys, loadFactor, mask, orderMixer, resizeAt| Constructor | Description |
|---|---|
ShortScatterSet() |
New instance with sane defaults.
|
ShortScatterSet(int expectedElements) |
New instance with sane defaults.
|
ShortScatterSet(int expectedElements,
double loadFactor) |
New instance with sane defaults.
|
| Modifier and Type | Method | Description |
|---|---|---|
static ShortScatterSet |
from(short... elements) |
Create a set from a variable number of arguments or an array of
short. |
protected int |
hashKey(short key) |
Returns a hash code for the given key.
|
int |
removeAll(ShortLookupContainer c) |
Default implementation uses a predicate for removal.
|
int |
retainAll(ShortPredicate predicate) |
Default implementation redirects to
ShortCollection.removeAll(ShortPredicate) and
negates the predicate. |
int |
retainAll(ShortLookupContainer c) |
Default implementation uses a predicate for retaining.
|
java.lang.String |
toString() |
Convert the contents of this container to a human-friendly string.
|
finalize, getClass, notify, notifyAll, wait, wait, waitremoveAll, retainAll, retainAlladd, addAll, addAll, addAll, allocateBuffers, allocateThenInsertThenRehash, clear, clone, contains, ensureCapacity, equals, forEach, hashCode, indexExists, indexGet, indexInsert, indexOf, indexReplace, isEmpty, iterator, rehash, release, remove, removeAll, removeAll, shiftConflictingKeys, size, toArray, verifyLoadFactor, visualizeKeyDistributionpublic ShortScatterSet()
public ShortScatterSet(int expectedElements)
public ShortScatterSet(int expectedElements,
double loadFactor)
protected int hashKey(short key)
ShortHashSetShortHashSet.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 ShortHashSetpublic static ShortScatterSet from(short... elements)
short. The elements are copied from the argument to the
internal buffer.public int removeAll(ShortLookupContainer c)
removeAll in interface ShortCollectionpublic int retainAll(ShortLookupContainer c)
retainAll in interface ShortCollectionpublic int retainAll(ShortPredicate predicate)
ShortCollection.removeAll(ShortPredicate) and
negates the predicate.retainAll in interface ShortCollectionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2018 Carrot Search s.c.. All Rights Reserved.