Improve docs.
[pyutils.git] / docs / pyutils.collectionz.rst
1 pyutils.collectionz package
2 ===========================
3
4 Submodules
5 ----------
6
7 pyutils.collectionz.bidict module
8 ---------------------------------
9
10 The bidict.BiDict class is a bidirectional dictionary.  It maps each
11 key to a value in constant time and each value back to the one or more
12 keys it is associated with in constant time.  It does this by simply
13 storing the data twice.
14
15 .. automodule:: pyutils.collectionz.bidict
16    :members:
17    :undoc-members:
18    :show-inheritance:
19
20 pyutils.collectionz.bst module
21 ------------------------------
22
23 The bst.BinarySearchTree class is a binary search tree container.
24
25 .. automodule:: pyutils.collectionz.bst
26    :members:
27    :undoc-members:
28    :show-inheritance:
29
30 pyutils.collectionz.shared\_dict module
31 ---------------------------------------
32
33 The shared\_dict.SharedDict class is a normal python dictionary that
34 can be accessed safely in parallel from multiple threads or processes
35 without (external) locking by using Multiprocessing.SharedMemory.  It
36 uses internal locking and rewrites the shared memory region as it is
37 changed so it is slower than a normal dict.  It also does not grow
38 dynamically; the creator of the shared\_dict must declare a maximum
39 size.
40
41 .. automodule:: pyutils.collectionz.shared_dict
42    :members:
43    :undoc-members:
44    :show-inheritance:
45
46 pyutils.collectionz.trie module
47 -------------------------------
48
49 The trie.Trie class is a Trie or prefix tree.  It can be used with
50 arbitrary sequences as keys and stores its values in a tree with paths
51 determined by the sequence determined by each key.  Thus, it can
52 determine whether a value is contained in the tree via a simple
53 traversal in linear time and can also check whether a key-prefix is
54 present in the tree in linear time.
55
56 .. automodule:: pyutils.collectionz.trie
57    :members:
58    :undoc-members:
59    :show-inheritance:
60
61 Module contents
62 ---------------
63
64 .. automodule:: pyutils.collectionz
65    :members:
66    :undoc-members:
67    :show-inheritance: