{ "info": { "author": "Alexander Maslyaev", "author_email": "maslyaev@gmail.com", "bugtrack_url": null, "classifiers": [], "description": " \r\r\n There is no implemenation of SBST in Standard Python Library, and I found it quite inconvenient and a little bit disappointing.\r\r\n \r\r\n This is a compact, portable (no dependencies) and extremely easy-to-use implementation of self-balancing binary search tree. This particular type of trees (so called AA-tree) is described here: https://en.wikipedia.org/wiki/AA_tree\r\r\n \r\r\n **Features:**\r\r\n 1. You can use this module through `import` instruction or simply copy-paste the implementation into your source code, and be happy.\r\r\n 2. While instantiating `sbst` object you can specify your own comparison function or use default simple comparison.\r\r\n 3. You can add values to tree one-by-one using function `add`, or fill it from some iterable object (function `addfrom`). Either initialization in constructor is possible.\r\r\n 4. The tree stores all duplicates. This feature is vital if the tree is an index for in-memory table.\r\r\n 5. This SBST gives you two basic search operations:\r\r\n - `min` - returns minimal value that is not less (if `inclusive` parameter is True) or greater (inclusive=False) than specified limit.\r\r\n - `max` - returns maximal value that is not greater (if `inclusive` parameter is True) or less (inclusive=False) than specified limit.\r\r\n If you have not specified limit, functions return respectively minimal or maximal value in the tree.\r\r\n 6. Function `forward_from` returns generator that yields sorted sequence of values starting from a specified value. Function `backward_from` yields reverse-sorted sequence down from a specified value. These functions have `inclusive` option too. If starting value is not specified, these functions yield respectively sorted or reverse-sorted sequences of all values in the tree. If tree modified while iterating (some values inserted, some removed, tree rebalanced), sequence will be yielded in right predictable way.\r\r\n 7. If comparison function treats values as equal, they will be yielded by `forward_from` and `backward_from` generators in the insertion order.\r\r\n 8. Do not store _None_ values into tree. Even if your comparison function can process them, you will not be able to search them because None value will be treated as 'not specified'.\r\r\n 9. If mutable objects inserted into the tree are changed, their sequence in tree may become irrelevant. So after value mutation it is a good idea to remove it from tree and add again.\r\r\n 10. Methods `add` and `remove` are not thread-safe. Be careful.\r\r\n \r\r\n Tutorial: [doc/tutorial.md](doc/tutorial.md)\r\r\n \r\nKeywords: binary tree\r\nPlatform: UNKNOWN\r\nClassifier: Development Status :: 4 - Beta\r\nClassifier: Intended Audience :: Developers\r\nClassifier: Intended Audience :: Education\r\nClassifier: Topic :: Software Development :: Libraries\r\nClassifier: License :: CC0 1.0 Universal (CC0 1.0) Public Domain Dedication\r\nClassifier: Programming Language :: Python :: 3\r\nClassifier: Programming Language :: Python :: 3.4\r\nClassifier: Programming Language :: Python :: 3.5\r\nClassifier: Programming Language :: Python :: 3.6\r\nDescription-Content-Type: text/markdown\r\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/amaslyaev/aa_sbst_py", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "aa-sbst", "package_url": "https://pypi.org/project/aa-sbst/", "platform": "", "project_url": "https://pypi.org/project/aa-sbst/", "project_urls": { "Bug Reports": "https://github.com/amaslyaev/aa_sbst_py/issues", "Homepage": "https://github.com/amaslyaev/aa_sbst_py", "Source": "https://github.com/amaslyaev/aa_sbst_py" }, "release_url": "https://pypi.org/project/aa-sbst/0.1.2/", "requires_dist": null, "requires_python": "", "summary": "Self-balancing binary search tree", "version": "0.1.2" }, "last_serial": 3850713, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "3f3a262c01e80bc611e4b2eb31e35a75", "sha256": "40e6f322c73784b5def0ac3cccdda6c667ae501d0eff67cbcf31b188172b7a0b" }, "downloads": -1, "filename": "aa_sbst-0.1.1.tar.gz", "has_sig": false, "md5_digest": "3f3a262c01e80bc611e4b2eb31e35a75", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9283, "upload_time": "2018-05-08T20:11:05", "url": "https://files.pythonhosted.org/packages/78/36/ca3ab3f37e3ed6f7b7eee597023c2fb555c3b5a062c6aa3ca1c371702845/aa_sbst-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "bde5429d8c8840b9cb269380bb77202e", "sha256": "279d17d260138eb8c2d10c43c6f3664b1501a8cfcf6b9cf664fcb1130e7cafc8" }, "downloads": -1, "filename": "aa_sbst-0.1.2.tar.gz", "has_sig": false, "md5_digest": "bde5429d8c8840b9cb269380bb77202e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11979, "upload_time": "2018-05-10T15:02:59", "url": "https://files.pythonhosted.org/packages/32/b8/d1d1c862649d3fd35e7f12707116139f2f8f44d36ed51077b6e62a0639a7/aa_sbst-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "bde5429d8c8840b9cb269380bb77202e", "sha256": "279d17d260138eb8c2d10c43c6f3664b1501a8cfcf6b9cf664fcb1130e7cafc8" }, "downloads": -1, "filename": "aa_sbst-0.1.2.tar.gz", "has_sig": false, "md5_digest": "bde5429d8c8840b9cb269380bb77202e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11979, "upload_time": "2018-05-10T15:02:59", "url": "https://files.pythonhosted.org/packages/32/b8/d1d1c862649d3fd35e7f12707116139f2f8f44d36ed51077b6e62a0639a7/aa_sbst-0.1.2.tar.gz" } ] }