@Generated(date="2015-05-07T09:33:04+0200",
value="KTypeScatterSet.java")
public class ByteScatterSet
extends ByteHashSet
ByteHashSet 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.
ByteHashSet,
HPPC interfaces diagramByteHashSet.EntryIteratorassigned, hasEmptyKey, keyMixer, keys, loadFactor, mask, orderMixer, resizeAt| Constructor and Description |
|---|
ByteScatterSet()
New instance with sane defaults.
|
ByteScatterSet(int expectedElements)
New instance with sane defaults.
|
ByteScatterSet(int expectedElements,
double loadFactor)
New instance with sane defaults.
|
| Modifier and Type | Method and Description |
|---|---|
static ByteScatterSet |
from(byte... elements)
Create a set from a variable number of arguments or an array of
byte. |
protected int |
hashKey(byte key)
Returns a hash code for the given key.
|
int |
removeAll(ByteLookupContainer c)
Default implementation uses a predicate for removal.
|
int |
retainAll(ByteLookupContainer c)
Default implementation uses a predicate for retaining.
|
int |
retainAll(BytePredicate predicate)
Default implementation redirects to
ByteCollection.removeAll(BytePredicate) and
negates the predicate. |
java.lang.String |
toString()
Convert the contents of this container to a human-friendly string.
|
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, visualizeKeyDistributionfinalize, getClass, notify, notifyAll, wait, wait, waitremoveAll, retainAll, retainAllpublic ByteScatterSet()
public ByteScatterSet(int expectedElements)
public ByteScatterSet(int expectedElements,
double loadFactor)
protected int hashKey(byte key)
ByteHashSetByteHashSet.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 ByteHashSetpublic static ByteScatterSet from(byte... elements)
byte. The elements are copied from the argument to the
internal buffer.public int removeAll(ByteLookupContainer c)
removeAll in interface ByteCollectionpublic int retainAll(ByteLookupContainer c)
retainAll in interface ByteCollectionpublic int retainAll(BytePredicate predicate)
ByteCollection.removeAll(BytePredicate) and
negates the predicate.retainAll in interface ByteCollectionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2015 Carrot Search s.c.. All Rights Reserved.