{ "info": { "author": "St\u00e9phane Caron", "author_email": "stephane.caron@lirmm.fr", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Intended Audience :: Science/Research", "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Mathematics" ], "description": "This library implements common operations over `convex polyhedra `_ such\nas `polytope projection `_, `double description `_ (conversion between\nhalfspace and vertex representations), computing the `Chebyshev center `_,\netc.\n\nSee the complete `API documentation `_ for details.\n\nExamples\n--------\n\nVertex enumeration\n~~~~~~~~~~~~~~~~~~\n\nWe can compute the list of vertices of a polytope described in halfspace\nrepresentation by ``A * x <= b``:\n\n.. code:: python\n\n import numpy\n import pypoman\n\n A = numpy.array([\n [-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1],\n [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0],\n [0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1],\n [1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0],\n [0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0],\n [0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1]])\n b = numpy.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 2, 2, 1, 2, 3])\n vertices = pypoman.compute_polytope_vertices(A, b)\n\nPolytope projection\n~~~~~~~~~~~~~~~~~~~\n\nLet us project an n-dimensional polytope over ``x = [x_1 ... x_n]`` onto its\nfirst two coordinates ``proj(x) = [x_1 x_2]``:\n\n.. code:: python\n\n import pypoman\n from numpy import array, eye, ones, vstack, zeros\n\n n = 10 # dimension of the original polytope\n p = 2 # dimension of the projected polytope\n\n # Original polytope:\n # - inequality constraints: \\forall i, |x_i| <= 1\n # - equality constraint: sum_i x_i = 0\n A = vstack([+eye(n), -eye(n)])\n b = ones(2 * n)\n C = ones(n).reshape((1, n))\n d = array([0])\n ineq = (A, b) # A * x <= b\n eq = (C, d) # C * x == d\n\n # Projection is proj(x) = [x_0 x_1]\n E = zeros((p, n))\n E[0, 0] = 1.\n E[1, 1] = 1.\n f = zeros(p)\n proj = (E, f) # proj(x) = E * x + f\n\n vertices = pypoman.project_polytope(proj, ineq, eq, method='bretl')\n\n if __name__ == \"__main__\": # plot projected polytope\n import pylab\n pylab.ion()\n pylab.figure()\n pypoman.plot_polygon(vertices)", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/stephane-caron/pypoman", "keywords": "convex,polyhedron,polyhedra,polytope,projection,duality", "license": "LGPL", "maintainer": "", "maintainer_email": "", "name": "pypoman", "package_url": "https://pypi.org/project/pypoman/", "platform": "", "project_url": "https://pypi.org/project/pypoman/", "project_urls": { "Homepage": "https://github.com/stephane-caron/pypoman" }, "release_url": "https://pypi.org/project/pypoman/0.5.4/", "requires_dist": null, "requires_python": "", "summary": "Polyhedron and polytope manipulation in Python", "version": "0.5.4" }, "last_serial": 4453852, "releases": { "0.5.0": [ { "comment_text": "", "digests": { "md5": "308bd2bba52dc953e44f5fa140f53410", "sha256": "7fe2cc6463b935be9dba1707fa489b626afe01acd5e84786c80a5ad823753608" }, "downloads": -1, "filename": "pypoman-0.5.0.tar.gz", "has_sig": false, "md5_digest": "308bd2bba52dc953e44f5fa140f53410", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11498, "upload_time": "2018-07-03T11:14:44", "url": "https://files.pythonhosted.org/packages/7b/78/b4b67e0c22cf308e524b6694540f7ad3ccdaf57a24bc2b1fe32484043f2a/pypoman-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "b850aa51b8e86b4ab838b0531c3f8d39", "sha256": "6563260cfa88349c2f8e9def0b91533550e74f17b39503247fa75bece4e32dce" }, "downloads": -1, "filename": "pypoman-0.5.1.tar.gz", "has_sig": false, "md5_digest": "b850aa51b8e86b4ab838b0531c3f8d39", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12435, "upload_time": "2018-07-05T09:11:40", "url": "https://files.pythonhosted.org/packages/7e/8c/547304eab8fa5be851ff9e7682bc685d99e245ca535ceff0234a478219fa/pypoman-0.5.1.tar.gz" } ], "0.5.2": [ { "comment_text": "", "digests": { "md5": "01f1275b68e343684c02ffc8e716ee64", "sha256": "65236a77ada5fb80d88ec142b9e9539162522ba4068ff8e9f1245f85fb18b0df" }, "downloads": -1, "filename": "pypoman-0.5.2.tar.gz", "has_sig": false, "md5_digest": "01f1275b68e343684c02ffc8e716ee64", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12419, "upload_time": "2018-07-05T09:42:17", "url": "https://files.pythonhosted.org/packages/d2/be/84e2083e1e6e629baea83d4444f969c8cc4b321018bae03f9da19188cf06/pypoman-0.5.2.tar.gz" } ], "0.5.3": [ { "comment_text": "", "digests": { "md5": "303587469c9820761f8988aafb3c8242", "sha256": "5f1ddf2174d30d51ceb533645f54bdedccda10f935a5eef42346581b1bafd4dd" }, "downloads": -1, "filename": "pypoman-0.5.3.tar.gz", "has_sig": false, "md5_digest": "303587469c9820761f8988aafb3c8242", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12438, "upload_time": "2018-07-05T09:50:51", "url": "https://files.pythonhosted.org/packages/64/54/40133389511be128d1200bd2e0b637285d916201d755e1e991f6c0b508a9/pypoman-0.5.3.tar.gz" } ], "0.5.4": [ { "comment_text": "", "digests": { "md5": "5b79fea1281ff7f92f6720b867e99255", "sha256": "52a649f7f5cb44d74e47688d8c5e943ddab9bce9f04b6f0676305b78c0ac1c66" }, "downloads": -1, "filename": "pypoman-0.5.4.tar.gz", "has_sig": false, "md5_digest": "5b79fea1281ff7f92f6720b867e99255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12489, "upload_time": "2018-11-05T17:23:05", "url": "https://files.pythonhosted.org/packages/05/e6/c9b51a224e6bee98f8b8655dfc76208ffe426ca9477b5ebabd01fd930a74/pypoman-0.5.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "5b79fea1281ff7f92f6720b867e99255", "sha256": "52a649f7f5cb44d74e47688d8c5e943ddab9bce9f04b6f0676305b78c0ac1c66" }, "downloads": -1, "filename": "pypoman-0.5.4.tar.gz", "has_sig": false, "md5_digest": "5b79fea1281ff7f92f6720b867e99255", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12489, "upload_time": "2018-11-05T17:23:05", "url": "https://files.pythonhosted.org/packages/05/e6/c9b51a224e6bee98f8b8655dfc76208ffe426ca9477b5ebabd01fd930a74/pypoman-0.5.4.tar.gz" } ] }