X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=docs%2Fpyutils.collectionz.rst;h=e0632afdbc3be35fc16657532065ed07646b57f4;hb=84f53cd94d18a8d239216704a6a33c7dbf2fc6b9;hp=c3424503628c6c817a46203a42aefa903851ae4d;hpb=1c60a8d9ae5a162f8d309b48f8a07ee6946f3e25;p=pyutils.git diff --git a/docs/pyutils.collectionz.rst b/docs/pyutils.collectionz.rst index c342450..e0632af 100644 --- a/docs/pyutils.collectionz.rst +++ b/docs/pyutils.collectionz.rst @@ -7,6 +7,11 @@ Submodules pyutils.collectionz.bidict module --------------------------------- +The bidict.BiDict class is a bidirectional dictionary. It maps each +key to a value in constant time and each value back to the one or more +keys it is associated with in constant time. It does this by simply +storing the data twice. + .. automodule:: pyutils.collectionz.bidict :members: :undoc-members: @@ -15,6 +20,8 @@ pyutils.collectionz.bidict module pyutils.collectionz.bst module ------------------------------ +The bst.BinarySearchTree class is a binary search tree container. + .. automodule:: pyutils.collectionz.bst :members: :undoc-members: @@ -23,6 +30,14 @@ pyutils.collectionz.bst module pyutils.collectionz.shared\_dict module --------------------------------------- +The shared\_dict.SharedDict class is a normal python dictionary that +can be accessed safely in parallel from multiple threads or processes +without (external) locking by using Multiprocessing.SharedMemory. It +uses internal locking and rewrites the shared memory region as it is +changed so it is slower than a normal dict. It also does not grow +dynamically; the creator of the shared\_dict must declare a maximum +size. + .. automodule:: pyutils.collectionz.shared_dict :members: :undoc-members: @@ -31,6 +46,13 @@ pyutils.collectionz.shared\_dict module pyutils.collectionz.trie module ------------------------------- +The trie.Trie class is a Trie or prefix tree. It can be used with +arbitrary sequences as keys and stores its values in a tree with paths +determined by the sequence determined by each key. Thus, it can +determine whether a value is contained in the tree via a simple +traversal in linear time and can also check whether a key-prefix is +present in the tree in linear time. + .. automodule:: pyutils.collectionz.trie :members: :undoc-members: