{ "info": { "author": "Bernd G\u00e4rtner, Konstantin Weddige", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python", "Topic :: Scientific/Engineering", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Software Development :: Libraries", "Topic :: Utilities" ], "description": "miniball\n========\n\nThese are python bindings to Bernd G\u00e4rtners `miniball software`__.\n\nSetup\n-----\n\nTo install *miniball* clone the repository and run the setup script:\n\n.. code-block:: bash\n \n python setup.py install\n\nThere is also a package for Arch Linux: https://aur.archlinux.org/packages/python-miniball/\n\nExample\n-------\n\n.. code-block:: python\n\n import math\n import random\n import miniball\n\n P = [(random.uniform(0, 100), random.uniform(0, 100)) for i in range(10000)]\n mb = miniball.Miniball(P)\n print('Center', mb.center())\n print('Radius', math.sqrt(mb.squared_radius()))\n\nNotes\n-----\nThis algorithm has some numerical challenges worth mentioning. The result may deviate from the optimal result by\n10 times the machine epsilon and sometimes even more:\n\n.. code-block:: python\n\n P = [(642123.5528970208, 5424489.146461355),\n (651592.349934072, 5424969.380667617),\n (642591.1068130962, 5425775.320365907),\n (646380.0282527813, 5418648.987550308),\n (648098.891235107, 5426586.3920675),\n (650011.5835629451, 5426132.820254512),\n (650297.6960375579, 5419125.777007122),\n (645249.2122321032, 5421055.739722816),\n (645333.9125837489, 5426228.852409409)]\n\n mb = miniball.Miniball(P)\n if not mb.is_valid():\n print('Possibly invalid!')\n print('Relative error', mb.relative_error())\n\nIf this is a problem for you, shifting the input towards (0,0) may help:\n\n.. code-block:: python\n\n minx = min(P, key=lambda p: p[0])[0]\n miny = min(P, key=lambda p: p[1])[1]\n\n P = [(p[0] - minx, p[1] - miny) for p in P]\n\n mb = miniball.Miniball(P)\n if not mb.is_valid():\n print('Possibly invalid!')\n print('Relative error', mb.relative_error())\n\n__ http://www.inf.ethz.ch/personal/gaertner/miniball.html", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/weddige/miniball", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "MiniballCpp", "package_url": "https://pypi.org/project/MiniballCpp/", "platform": "", "project_url": "https://pypi.org/project/MiniballCpp/", "project_urls": { "Homepage": "https://github.com/weddige/miniball" }, "release_url": "https://pypi.org/project/MiniballCpp/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Smallest Enclosing Balls of Points", "version": "0.2.1" }, "last_serial": 5645234, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "1957e6a4fce376317db3f98be4f4315e", "sha256": "f1c4237958436416e7ffe61d1e0a501dafbca44c6bc6f2fd60713b6fa79beae1" }, "downloads": -1, "filename": "MiniballCpp-0.2.tar.gz", "has_sig": false, "md5_digest": "1957e6a4fce376317db3f98be4f4315e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3575, "upload_time": "2019-08-07T14:00:49", "url": "https://files.pythonhosted.org/packages/34/1c/acebd9e1a21970606a9fe70dc6560718ff3232e33e7e65accc2def2929dc/MiniballCpp-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "666017b99fe94ab4f679fef75fbea6e6", "sha256": "5cdc3ff8f178ca57f46630a4f8b420491f5ba533c89a9cb2b9cf7892294b9bed" }, "downloads": -1, "filename": "MiniballCpp-0.2.1.tar.gz", "has_sig": false, "md5_digest": "666017b99fe94ab4f679fef75fbea6e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-08-07T14:07:29", "url": "https://files.pythonhosted.org/packages/58/57/8974083a55390ae1f52f6da9d75a242ce19d7c58df0c4fe281fbf97b55fe/MiniballCpp-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "666017b99fe94ab4f679fef75fbea6e6", "sha256": "5cdc3ff8f178ca57f46630a4f8b420491f5ba533c89a9cb2b9cf7892294b9bed" }, "downloads": -1, "filename": "MiniballCpp-0.2.1.tar.gz", "has_sig": false, "md5_digest": "666017b99fe94ab4f679fef75fbea6e6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7374, "upload_time": "2019-08-07T14:07:29", "url": "https://files.pythonhosted.org/packages/58/57/8974083a55390ae1f52f6da9d75a242ce19d7c58df0c4fe281fbf97b55fe/MiniballCpp-0.2.1.tar.gz" } ] }