@Generated(date="2016-10-25T13:31:56+0200",
value="KTypeScatterSet.java")
public class FloatScatterSet
extends FloatHashSet
FloatHashSet 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.
FloatHashSet,
HPPC interfaces diagramFloatHashSet.EntryIteratorassigned, hasEmptyKey, keyMixer, keys, loadFactor, mask, orderMixer, resizeAt| Constructor and Description |
|---|
FloatScatterSet()
New instance with sane defaults.
|
FloatScatterSet(int expectedElements)
New instance with sane defaults.
|
FloatScatterSet(int expectedElements,
double loadFactor)
New instance with sane defaults.
|
| Modifier and Type | Method and Description |
|---|---|
static FloatScatterSet |
from(float... elements)
Create a set from a variable number of arguments or an array of
float. |
protected int |
hashKey(float key)
Returns a hash code for the given key.
|
int |
removeAll(FloatLookupContainer c)
Default implementation uses a predicate for removal.
|
int |
retainAll(FloatLookupContainer c)
Default implementation uses a predicate for retaining.
|
int |
retainAll(FloatPredicate predicate)
Default implementation redirects to
FloatCollection.removeAll(FloatPredicate) 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 FloatScatterSet()
public FloatScatterSet(int expectedElements)
public FloatScatterSet(int expectedElements,
double loadFactor)
protected int hashKey(float key)
FloatHashSetFloatHashSet.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 FloatHashSetpublic static FloatScatterSet from(float... elements)
float. The elements are copied from the argument to the
internal buffer.public int removeAll(FloatLookupContainer c)
removeAll in interface FloatCollectionpublic int retainAll(FloatLookupContainer c)
retainAll in interface FloatCollectionpublic int retainAll(FloatPredicate predicate)
FloatCollection.removeAll(FloatPredicate) and
negates the predicate.retainAll in interface FloatCollectionpublic java.lang.String toString()
toString in class java.lang.ObjectCopyright © 2016 Carrot Search s.c.. All Rights Reserved.