{ "info": { "author": "Philippe Bordron", "author_email": "UNKNOWN", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "UFx\n===\n\nUFx is a pure python library that implements the `disjoint-set data\nstructure `__\nwhich allows the union-find operations.\n\nTwo implementations are proposed.\n\n- ``uf_hash`` using python dictionary\n- ``uf_tree`` using nodes linked each to its ansestror\n\nThose implementations are design for hashable types. However it is\npossible to use the ``UFNode`` class present in the ``uf_tree``\nimplementation with non-hashable types (see the *API documentation* part\nbelow).\n\nUFx was only tested with *python 2.7*, *python 3.5* and *pypy* but may\nwork with other versions python virtual machines.\n\nPerformances\n------------\n\nThe ``uf_hash`` implementation is the recommanded one. It performs well\nwith the classic python virtual machine. The ``uf_tree`` implementation\nis really slow due to the poor performances of python with pointer like\nbased data structures. The use of another python virtual machine like\n*pypy* its recommanded when using the ``uf_tree`` implementation.\n\n*TODO: Table of computation speed and memory consumption*\n\nAPI documentation\n-----------------\n\nImport\n~~~~~~\n\nYou can import one of the implementation of the disjoint-set data\nstructure\n\n::\n\n from ufx import uf_tree as ufx\n\nor\n\n::\n\n from ufx import uf_hash as ufx\n\nQuick Example\n~~~~~~~~~~~~~\n\n::\n\n import sys\n import random\n uf = ufx.UnionFind()\n az = \"abcdefghijklmnopqrstuvwxyz\"\n az += az.upper()\n for e in az:\n uf.make_set(e)\n i = 0\n while i < 26:\n i += 1\n uf.union(random.choice(az), random.choice(az))\n print(uf)\n print(uf.get_size('a'))\n uf.clear()\n print(uf)\n\nHashable types\n~~~~~~~~~~~~~~\n\nTODO\n\nNon-hashable types\n~~~~~~~~~~~~~~~~~~\n\nLook on the class ``UFNode``", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "LGPL", "maintainer": null, "maintainer_email": null, "name": "UFx", "package_url": "https://pypi.org/project/UFx/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/UFx/", "project_urls": { "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/UFx/1.0/", "requires_dist": null, "requires_python": null, "summary": "UFx is a pure python library that implements the disjoint-set data structure which allows the union-find operations.", "version": "1.0" }, "last_serial": 2168894, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "614fab6c024e982c66a10be6b7ff1a1c", "sha256": "94b9d11dbe6847fb6994c768e5259f7b625cfcdd016e09dbcff1aac89a75be51" }, "downloads": -1, "filename": "UFx-1.0.0.tar.gz", "has_sig": false, "md5_digest": "614fab6c024e982c66a10be6b7ff1a1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4565, "upload_time": "2016-06-15T15:53:32", "url": "https://files.pythonhosted.org/packages/4b/33/3cabcd51f4f9ec345cfc9667a8638a7df86d3c11a2ac5ee9643830698c1a/UFx-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "614fab6c024e982c66a10be6b7ff1a1c", "sha256": "94b9d11dbe6847fb6994c768e5259f7b625cfcdd016e09dbcff1aac89a75be51" }, "downloads": -1, "filename": "UFx-1.0.0.tar.gz", "has_sig": false, "md5_digest": "614fab6c024e982c66a10be6b7ff1a1c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4565, "upload_time": "2016-06-15T15:53:32", "url": "https://files.pythonhosted.org/packages/4b/33/3cabcd51f4f9ec345cfc9667a8638a7df86d3c11a2ac5ee9643830698c1a/UFx-1.0.0.tar.gz" } ] }