Skip to main content

Python PPL wrapper

Project description

This Python package provides a wrapper to the C++ Parma Polyhedra Library (PPL).

The whole package started as a fork of a tiny part of the Sage software.

How it works

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

>>> 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 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. 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

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pplpy-0.9.0.tar.gz (69.2 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pplpy-0.9.0-cp314-cp314t-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ x86-64

pplpy-0.9.0-cp314-cp314t-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.14tmusllinux: musl 1.2+ ARM64

pplpy-0.9.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pplpy-0.9.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pplpy-0.9.0-cp314-cp314t-macosx_15_0_x86_64.whl (3.2 MB view details)

Uploaded CPython 3.14tmacOS 15.0+ x86-64

pplpy-0.9.0-cp314-cp314t-macosx_15_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.14tmacOS 15.0+ ARM64

pplpy-0.9.0-cp314-cp314-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ x86-64

pplpy-0.9.0-cp314-cp314-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.14musllinux: musl 1.2+ ARM64

pplpy-0.9.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pplpy-0.9.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pplpy-0.9.0-cp314-cp314-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.14macOS 15.0+ x86-64

pplpy-0.9.0-cp314-cp314-macosx_15_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

pplpy-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ x86-64

pplpy-0.9.0-cp313-cp313-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.13musllinux: musl 1.2+ ARM64

pplpy-0.9.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pplpy-0.9.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pplpy-0.9.0-cp313-cp313-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.13macOS 15.0+ x86-64

pplpy-0.9.0-cp313-cp313-macosx_15_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

pplpy-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl (4.6 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ x86-64

pplpy-0.9.0-cp312-cp312-musllinux_1_2_aarch64.whl (4.3 MB view details)

Uploaded CPython 3.12musllinux: musl 1.2+ ARM64

pplpy-0.9.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (3.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

pplpy-0.9.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl (3.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ ARM64manylinux: glibc 2.28+ ARM64

pplpy-0.9.0-cp312-cp312-macosx_15_0_x86_64.whl (3.1 MB view details)

Uploaded CPython 3.12macOS 15.0+ x86-64

pplpy-0.9.0-cp312-cp312-macosx_15_0_arm64.whl (2.9 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

Details for the file pplpy-0.9.0.tar.gz.

File metadata

  • Download URL: pplpy-0.9.0.tar.gz
  • Upload date:
  • Size: 69.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pplpy-0.9.0.tar.gz
Algorithm Hash digest
SHA256 8289c50d680ce3f9eacac666cb4cdbbd8a711959e7cc7cf06f7fdb4035d0cc5d
MD5 6c470cabe9ca81c11ad09ac091f5c139
BLAKE2b-256 75b0bcda4d51601f4e7dc5d5983972d5947c6c2c9cb943de359f0ba989b1c7ac

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 00eee81a10bcd049f6407d317064ffca0b8f022687e0303181918e2c01419220
MD5 fa735e0ea90316bd292510b09fa94ca3
BLAKE2b-256 e06accf74b83c908a2d271a78ba8cbabc8b43c12b304f431f1b8c8da18a7cb84

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 fa8a874d4ebe41747635e007b6e6520e7481beb2e0c92e23f1c5e58275535e93
MD5 482982af8ec2852b059d22a716cae24a
BLAKE2b-256 e91d8479e5a0cd4344ec2069b5934ec399b4953c9d18df381f586c8d28615ffc

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 4b8ec932db25788326bb49280f9f3cc8ecf42571df654cd5b737fdfb88aa1e0c
MD5 ac2b97d99e7d026cbce97660b4730149
BLAKE2b-256 623e6270525227ee18cbed6d5aa8c4cd996debfc8cb3690b0224c31c18508ea4

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 32e58453bea5ca5977ce0031951f72be1afcb1958d8dfb23ffe1c54a47aa7ba5
MD5 fdd5eb4a687254dbde15d7bdfff0c1c0
BLAKE2b-256 a272610d81318974cc57d5ccd932361e9ad95abee27b11f0049a31e79ac33046

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 5de5dcdce141ce839f7d826b40ef05b2c953f2818831af3d66373ebed58d5ee8
MD5 75a7b6e3bfa4c0ef5d9a48ef92f0769f
BLAKE2b-256 784ef897620b47ada8deed7366827da552b9d95417947b384915598ddce7cb2f

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314t-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314t-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 26c144a82ff408b3d536dfacad7dd1af5bf415b9d225afcf4a2c20cdaab50a54
MD5 19a76d26b9de978486f73d5e4af30f80
BLAKE2b-256 22a338c03d8aff72fa62d7f0ec5630e6e5c627d9d5f993a1efe1fa7dc7613cd1

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 c9b3464d93a1c15b43e9c667dee2aca85db93c3cc9bff5d9b2f5316000d19912
MD5 131135de0cc79b10a481ccb97919a764
BLAKE2b-256 b302a4a8c43958263ff6035641e80fd8160ac98df6535e0b1a026ed086c1178b

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 95abf74ea6f27a26e2bd63a502623afa9244b805d3c9d6766fba94d09eea8e63
MD5 0220405f79ee725ab619a9ad98c02021
BLAKE2b-256 81388548f8056f4ee5a97f2cc44499de8fa3853d0ccead98aa675cf341448d40

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 10f858d1f9803a4a60ad8c5640b0558e24d1a1a2260ac52e0dce8c727e669218
MD5 112c7f4b6161ca2848e034036eb748d4
BLAKE2b-256 319f64941c8bff0bdf71f1732c0ae666c8d634fff71a5413e7a136b959e79b1f

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 306e8492c15a190f4fc0349d934931c0853066afff0c789c707eaf865d48ec42
MD5 66faa09cafa7721ab3d19582a41ebab9
BLAKE2b-256 4befd025595869ebddeb8bf2ba8c48849da81cdb7e5b7fe83d30bf6042e204c1

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 efeef0dbcf543f4bf9a6656807cacdbca788b90d5449ccd820dafd0580cbaaa9
MD5 ddf7c12694da48002509605b1d7ac3e2
BLAKE2b-256 11476c39694e4b65b83b87385f3d5dd0cfbf0dd578a201dfc7e93cc84c6368ac

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 61041bd34925254a32944f1e7b6cb615fa9cfa33f961c666743c4a24c6bff741
MD5 28d8954421bd2285a707af503fe4ecbd
BLAKE2b-256 8ae1fa71454eac45473dfff0e7f5f3c92109ab6f53724e59b8808f03f35ef918

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 95646737972653d19f54a9a9939e69fd85dd34b8c5294ee958465af576159d75
MD5 52bb0dd4f411ef4cef44fcb1ff71fef9
BLAKE2b-256 4f74254e1afc59675d6723b5ceec4b6955fe6af0ced45134c56e8f93d406cf70

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 574743cdb00d6f88959382272e502bbe4a4fb8793f965e9a0c317c04a8ae201d
MD5 00f875485fbdf3ce4ff1bbb1310e3851
BLAKE2b-256 5eb6716ef8808c97cf1c314ca62c3f8b8291bfb2df4a59f39917aa2c62fbdfdc

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 de5233f30649ea82e13ed39a16188c43258d1261829c7dabc0c07dab9c9b0ed6
MD5 f146a37171e7145224b09608ceb9ce66
BLAKE2b-256 50b46814e255fdb2813df8d48f7acd96c125fde46ce5f39293b63fb1454db859

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 7ab9ddba5a9b23127e9cbec9d1dd8241ebaa9c1b01828ddf1a20f93000a31e55
MD5 2ecaac369586898f334d01c1c0124a6b
BLAKE2b-256 afbffae2c7d3ff15d28c5f2078fbe41fa4568362a858e130f8b1b2920b343c4e

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 63651e5bbc15a7efd815c7c7f0bbd992ea5ea7077489dea990cb920c18079579
MD5 a7fa07e8fc5d787720a1ece7a96b2763
BLAKE2b-256 333bdeca2a86a3c8291b12db4e61fb68896ce03199c774b28a5d28a951ce5391

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 424bb28992ba36fbf0cb57d243d95f4504ad220049e8bf163c237cfcfb636060
MD5 94e145fa619bc9356dc9802517c1d7b5
BLAKE2b-256 0c55c70700a9bdc9f095d5669cbf07e8d0d0a7181c8d975e2f2c395e3ce800c5

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-musllinux_1_2_x86_64.whl
Algorithm Hash digest
SHA256 934f2118b374e83716a94f2d1fdbd4546b4b8ac7b9edfecf97c62778b2fa9e7e
MD5 24860a7aec68027f09ec77240ac2f91f
BLAKE2b-256 66121bfe5df010cf5b270fa6c67030d47af9704e055b19575f9871e71bba2093

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-musllinux_1_2_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-musllinux_1_2_aarch64.whl
Algorithm Hash digest
SHA256 5fcb091d5466d384b2df769f4252c0abe2b29925be71850af057ee29193b982a
MD5 95bca5646dc6c07f949458a2393ae93a
BLAKE2b-256 c3c6381bc7135d5bef0bf749cf4fcf8c590e53a54eeaf34c3f0dda4c5945d826

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f4cee4e830fd9a4c5891fb4ef3a4a1b9de78cb479a5bd16d034feccd579285ea
MD5 89d558306e728a983d6cc949fce4dfea
BLAKE2b-256 b80b7e05045b2d7766f6dc4bfcb1f78c750c44b8f33c301ab742821c7441747f

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-manylinux_2_24_aarch64.manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 daf8474f7d7d50acc842ae85839d1116d88d1fb8f52dca8a7e1d7c65e801e9c1
MD5 2674c6f2bf861874794f92ae6095204c
BLAKE2b-256 ff132052407eb90d85f621d677a9a63df72421d804092263a6231083d37e05d8

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 1cde9595a4dffb20673103c307f47c433a4befe5ea129ad839fec8aa5254e630
MD5 9ff9ac9e1a47ccd051f789efed80a416
BLAKE2b-256 2d72475c8c9755d96bfcc19f33c4eb850be446d7d2a187c86cf338fb27b0b3a6

See more details on using hashes here.

File details

Details for the file pplpy-0.9.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for pplpy-0.9.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 34679b7959a1591bec061ba324130781ad104bead4bf00cf396a7a77486ac4aa
MD5 b95996627d289e46e139db89c480a09f
BLAKE2b-256 7accab8604f67e0dc0f2f49b115e8a3be0bb788768394ef7989fef9f72bb71d4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page