pplpy


Namepplpy JSON
Version 0.8.10 PyPI version JSON
download
home_pageNone
SummaryPython PPL wrapper
upload_time2024-03-24 18:51:36
maintainerNone
docs_urlhttps://pythonhosted.org/pplpy/
authorNone
requires_pythonNone
licenseGPL v3
keywords polyhedron polytope convex mathematics ppl milp linear-programming
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            PPL Python wrapper
==================

This Python package provides a wrapper to the C++ `Parma Polyhedra Library
(PPL) <http://bugseng.com/products/ppl/>`_.

The whole package started as a fork of a tiny part of the `Sage
<http://sagemath.org>`_ software.

How it works
------------

The names of objects and methods are the same as in the library:

.. code:: python

    >>> import ppl
    >>> x = ppl.Variable(0)
    >>> y = ppl.Variable(1)
    >>> z = ppl.Variable(2)
    >>> cs = ppl.Constraint_System()
    >>> cs.insert(x >= 0)
    >>> cs.insert(y >= 0)
    >>> cs.insert(z >= 0)
    >>> cs.insert(x + y + z == 1)
    >>> poly = ppl.C_Polyhedron(cs)
    >>> poly.minimized_generators()
    Generator_System {point(1/1, 0/1, 0/1), point(0/1, 1/1, 0/1), point(0/1, 0/1, 1/1)}

The available objects and functions from the `ppl` Python module are:

- `Variable`, `Variables_Set`, `Linear_Expression` (defined in `ppl.linear_algebra`)

- `MIP_Problem` (defined in `ppl.mip_problem`)

- `C_Polyhedron`, `NNC_Polyhedron` (defined in `ppl.polyhedron`)

- `Generator`, `Generator_System`, `Poly_Gen_Relation`, `point`,
  `closure_point`, `ray`, `line` (defined in `ppl.generator`)

- `Constraint`, `Constraint_System`, `Poly_Con_Relation`,
  `inequality`, `equation`, `strict_inequality` (defined in `ppl.constraint`)

Installation
------------

The project is available at `Python Package Index <https://pypi.org/project/pplpy/>`_ and
can be installed with pip::

    $ pip install pplpy

Note that if you have gmp and ppl installed in a non standard directory (e.g. you use brew
on MacOSX) then you need to set appropriately the variables `CFLAGS` before calling `pip`. For
example::

    $ export CFLAGS="-I/path/to/gmp/include/ -L/path/to/gmp/lib/ -I/path/to/ppl/include/ -L/path/to/ppl/lib $CFLAGS"
    $ pip install pplpy

Using from Cython
-----------------

All Python classes from pplpy are extension types and can be used with Cython. Each
extension type carries an attribute `thisptr` that holds a pointer to
the corresponding C++ object from ppl.

A complete example is provided with the files `tests/testpplpy.pyx` and `tests/setup.py`.

Source
------

You can find the latest version of the source code on github:
https://github.com/sagemath/pplpy

Documentation
-------------

An online version of the documentation is available at https://www.sagemath.org/pplpy/

Compiling the html documentation requires make and `sphinx <https://www.sphinx-doc.org/en/master/>`_.
Before building the documentation, you need to install the pplpy package (sphinx uses Python introspection).
The documentation source code is contained in the repository `docs` where there is a standard
Makefile with a target `html`. Running `make html` in the `docs` repository builds the documentation
inside `docs/build/html`. For more configuration options, run `make help`.

License
-------

pplpy is distributed under the terms of the GNU General Public License (GPL)
published by the Free Software Foundation; either version 3 of
the License, or (at your option) any later version. See http://www.gnu.org/licenses/.

Requirements
------------

- `PPL <http://bugseng.com/products/ppl/>`_

- `Cython <http://cython.org>`_ (tested with both 0.29 and 3.0)

- `cysignals <https://pypi.org/project/cysignals/>`_

- `gmpy2 <https://pypi.org/project/gmpy2/>`_

On Debian/Ubuntu systems the dependencies can be installed with::

    $ sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libppl-dev cython3 python3-gmpy2 python3-cysignals-pari

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pplpy",
    "maintainer": null,
    "docs_url": "https://pythonhosted.org/pplpy/",
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "polyhedron, polytope, convex, mathematics, ppl, milp, linear-programming",
    "author": null,
    "author_email": "Vincent Delecroix <vincent.delecroix@labri.fr>",
    "download_url": "https://files.pythonhosted.org/packages/92/d0/664f5ee65a8d9d071c2cdbfc8e42e0476b5b8c5ceefaa5fc9c2e1cd6fa5e/pplpy-0.8.10.tar.gz",
    "platform": "any",
    "description": "PPL Python wrapper\n==================\n\nThis Python package provides a wrapper to the C++ `Parma Polyhedra Library\n(PPL) <http://bugseng.com/products/ppl/>`_.\n\nThe whole package started as a fork of a tiny part of the `Sage\n<http://sagemath.org>`_ software.\n\nHow it works\n------------\n\nThe names of objects and methods are the same as in the library:\n\n.. code:: python\n\n    >>> import ppl\n    >>> x = ppl.Variable(0)\n    >>> y = ppl.Variable(1)\n    >>> z = ppl.Variable(2)\n    >>> cs = ppl.Constraint_System()\n    >>> cs.insert(x >= 0)\n    >>> cs.insert(y >= 0)\n    >>> cs.insert(z >= 0)\n    >>> cs.insert(x + y + z == 1)\n    >>> poly = ppl.C_Polyhedron(cs)\n    >>> poly.minimized_generators()\n    Generator_System {point(1/1, 0/1, 0/1), point(0/1, 1/1, 0/1), point(0/1, 0/1, 1/1)}\n\nThe available objects and functions from the `ppl` Python module are:\n\n- `Variable`, `Variables_Set`, `Linear_Expression` (defined in `ppl.linear_algebra`)\n\n- `MIP_Problem` (defined in `ppl.mip_problem`)\n\n- `C_Polyhedron`, `NNC_Polyhedron` (defined in `ppl.polyhedron`)\n\n- `Generator`, `Generator_System`, `Poly_Gen_Relation`, `point`,\n  `closure_point`, `ray`, `line` (defined in `ppl.generator`)\n\n- `Constraint`, `Constraint_System`, `Poly_Con_Relation`,\n  `inequality`, `equation`, `strict_inequality` (defined in `ppl.constraint`)\n\nInstallation\n------------\n\nThe project is available at `Python Package Index <https://pypi.org/project/pplpy/>`_ and\ncan be installed with pip::\n\n    $ pip install pplpy\n\nNote that if you have gmp and ppl installed in a non standard directory (e.g. you use brew\non MacOSX) then you need to set appropriately the variables `CFLAGS` before calling `pip`. For\nexample::\n\n    $ export CFLAGS=\"-I/path/to/gmp/include/ -L/path/to/gmp/lib/ -I/path/to/ppl/include/ -L/path/to/ppl/lib $CFLAGS\"\n    $ pip install pplpy\n\nUsing from Cython\n-----------------\n\nAll Python classes from pplpy are extension types and can be used with Cython. Each\nextension type carries an attribute `thisptr` that holds a pointer to\nthe corresponding C++ object from ppl.\n\nA complete example is provided with the files `tests/testpplpy.pyx` and `tests/setup.py`.\n\nSource\n------\n\nYou can find the latest version of the source code on github:\nhttps://github.com/sagemath/pplpy\n\nDocumentation\n-------------\n\nAn online version of the documentation is available at https://www.sagemath.org/pplpy/\n\nCompiling the html documentation requires make and `sphinx <https://www.sphinx-doc.org/en/master/>`_.\nBefore building the documentation, you need to install the pplpy package (sphinx uses Python introspection).\nThe documentation source code is contained in the repository `docs` where there is a standard\nMakefile with a target `html`. Running `make html` in the `docs` repository builds the documentation\ninside `docs/build/html`. For more configuration options, run `make help`.\n\nLicense\n-------\n\npplpy is distributed under the terms of the GNU General Public License (GPL)\npublished by the Free Software Foundation; either version 3 of\nthe License, or (at your option) any later version. See http://www.gnu.org/licenses/.\n\nRequirements\n------------\n\n- `PPL <http://bugseng.com/products/ppl/>`_\n\n- `Cython <http://cython.org>`_ (tested with both 0.29 and 3.0)\n\n- `cysignals <https://pypi.org/project/cysignals/>`_\n\n- `gmpy2 <https://pypi.org/project/gmpy2/>`_\n\nOn Debian/Ubuntu systems the dependencies can be installed with::\n\n    $ sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev libppl-dev cython3 python3-gmpy2 python3-cysignals-pari\n",
    "bugtrack_url": null,
    "license": "GPL v3",
    "summary": "Python PPL wrapper",
    "version": "0.8.10",
    "project_urls": {
        "Download": "https://pypi.org/project/pplpy/#files",
        "Homepage": "https://github.com/sagemath/pplpy"
    },
    "split_keywords": [
        "polyhedron",
        " polytope",
        " convex",
        " mathematics",
        " ppl",
        " milp",
        " linear-programming"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "92d0664f5ee65a8d9d071c2cdbfc8e42e0476b5b8c5ceefaa5fc9c2e1cd6fa5e",
                "md5": "ab1d684e650d26bb5446c5066de8d036",
                "sha256": "d42a216c82914dcf4d7c000debc98bb336b8f83e026ba5d952cccd9f8074effd"
            },
            "downloads": -1,
            "filename": "pplpy-0.8.10.tar.gz",
            "has_sig": false,
            "md5_digest": "ab1d684e650d26bb5446c5066de8d036",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 64203,
            "upload_time": "2024-03-24T18:51:36",
            "upload_time_iso_8601": "2024-03-24T18:51:36.362470Z",
            "url": "https://files.pythonhosted.org/packages/92/d0/664f5ee65a8d9d071c2cdbfc8e42e0476b5b8c5ceefaa5fc9c2e1cd6fa5e/pplpy-0.8.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-24 18:51:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sagemath",
    "github_project": "pplpy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "pplpy"
}
        
Elapsed time: 0.23985s