Array2DHashSet

Set implementation with closed hashing (open addressing).

Constructors

this
this()
Undocumented in source.
this
this(size_t function(Object o) @(trusted) nothrow hashOfFp, bool function(Object a, Object b) opEqualsFp)
Undocumented in source.
this
this(size_t function(Object o) @(trusted) nothrow hashOfFp, bool function(Object a, Object b) opEqualsFp, int initialCapacity, int initialBucketCapacity)
Undocumented in source.

Members

Functions

add
bool add(T t)

@uml @final

addAll
bool addAll(T[] c)
Undocumented in source. Be warned that the author may not have intended to support it.
clear
void clear()
Undocumented in source. Be warned that the author may not have intended to support it.
contains
bool contains(T o)

@uml @final

containsAll
bool containsAll(Object collection)
Undocumented in source. Be warned that the author may not have intended to support it.
containsFast
bool containsFast(T obj)
Undocumented in source. Be warned that the author may not have intended to support it.
createBucket
T[] createBucket(int capacity)
Undocumented in source. Be warned that the author may not have intended to support it.
createBuckets
T[][] createBuckets(int capacity)
Undocumented in source. Be warned that the author may not have intended to support it.
expand
void expand()
Undocumented in source. Be warned that the author may not have intended to support it.
get
T get(T o)
Undocumented in source. Be warned that the author may not have intended to support it.
getBucket
size_t getBucket(T o)

@uml @final

getOrAdd
T getOrAdd(T o)

@uml Add {@code o} to set if not there; return existing value if already there. This method performs the same operation as {@link #add} aside from the return value. @final

getOrAddImpl
T getOrAddImpl(T o)
Undocumented in source. Be warned that the author may not have intended to support it.
isEmpty
bool isEmpty()

@uml @final

opEquals
bool opEquals(Object o)

@uml @override

remove
bool remove(T o)

@uml @final

removeAll
bool removeAll(T[] c)
Undocumented in source. Be warned that the author may not have intended to support it.
removeFast
bool removeFast(T obj)
Undocumented in source. Be warned that the author may not have intended to support it.
retainAll
bool retainAll(T[] c)
Undocumented in source. Be warned that the author may not have intended to support it.
size
int size()

@uml @final

toArray
T[] toArray()
Undocumented in source. Be warned that the author may not have intended to support it.
toArray
U[] toArray(U[] a)
Undocumented in source. Be warned that the author may not have intended to support it.
toHash
size_t toHash()

@uml @override @safe @nothrow

toString
string toString()

@uml @override

toTableString
string toTableString()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

INITAL_BUCKET_CAPACITY
enum int INITAL_BUCKET_CAPACITY;
Undocumented in source.
INITAL_CAPACITY
enum int INITAL_CAPACITY;
Undocumented in source.
LOAD_FACTOR
enum double LOAD_FACTOR;
Undocumented in source.
buckets
T[][] buckets;
Undocumented in source.
currentPrime
int currentPrime;

@uml jump by 4 primes each expand or whatever

hashOfFp
size_t function(Object o) @(trusted) nothrow hashOfFp;
Undocumented in source.
initialBucketCapacity
int initialBucketCapacity;
Undocumented in source.
n
int n;

@uml How many elements in set

opEqualsFp
bool function(Object a, Object b) opEqualsFp;
Undocumented in source.
threshold
int threshold;

@uml when to expand

Meta