s2.util.container

Modules

btree
module s2.util.container.btree

Implementation of a B-Tree based upon "Introduction to Algorithms".

btree_map
module s2.util.container.btree_map
Undocumented in source.
dense_hash_set
module s2.util.container.dense_hash_set

This is just a very thin wrapper over dense_hash_table.d, just like sgi stl's stl_hash_set is a very thin wrapper over stl_hashtable. The major thing we define is operator[], because we have a concept of a data_type which stl_hashtable doesn't \(it only has a key and a value\).

dense_hash_table
module s2.util.container.dense_hash_table

A dense hashtable is a particular implementation of a hashtable: one that is meant to minimize memory allocation. It does this by using an array to store all the data. We steal a value from the key space to indicate "empty" array elements (ie indices where no item lives) and another to indicate "deleted" elements.

rbtree_map
module s2.util.container.rbtree_map
Undocumented in source.