yage.core.fastmap
- struct FastMap
(K,V);
- Behaves the same as a built-in associative array except
for the following space-for-time tradeoffs:
- The .keys and .values properties execute in O(1) and
perform no allocation.
- Iterating over the array is about 80% faster.
A .dup property has also been added.
Example:
FastMap!(char[], Foo) fooMap;
fooMap["key"] = new Foo();
foreach(key, value; fooMap) {}
- FastMap!(K,V) dup
();
- Perform a deep copy of the chain and its key value
arrays.
- K[] keys
();
- size_t length
();
- int opApply
(int delegate(ref V) dg);
- V opIndex
(K key);
- V opIndexAssign
(V value, K key);
- void rehash
();
- V[] values
();
|