Skip to main content

PyNormaliz_inequalities

Normaliz is a tool for various computations in discrete convex geometry. In particular it supports computations in polytopes and polyhedra specified by a system of linear inequalities. For example, it allows to compute the Hilbert or Ehrhart series of a polytope or polyhedron, and thereby count the number of integer points in it.

It is possible to interact with Normaliz using the Python package PyNormaliz, but the interface requires users to specify inequalities in a vector format. This package provides a more convenient interface for specifying inequalities in a natural format, and includes utility functions for interacting with PyNormaliz.

Installation

Normaliz and PyNormaliz must be installed on your system to use this package. You can install these packages using the following commands:

git clone https://github.com/Normaliz/Normaliz.git
cd Normaliz
./install_normaliz.sh
./install_pynormaliz.sh

To install this package, use pip:

pip install PyNormaliz_inequalities

Usage

The main point of the package is to allow users to specify inequalities in a natural format. The main components are Variables that can be combined into Expressions and Inequalitys, which can be collected into an InequalitySystem, which can then be passed to PyNormaliz.

Example: Basic Usage

Let's count the number of integer pairs (a,b) with a + b = n that satisfy the inequalities a >= 0, b >= 0, and a + b >= 1, as a function of n.

from PyNormaliz_inequalities import Variable, InequalitySystem, evaluate_quasipolynomial

a = Variable()
b = Variable()

inequalities = InequalitySystem()
inequalities.add_inequality(a >= 0)
inequalities.add_inequality(b >= 0)
inequalities.add_inequality(a + b >= 1)

quasipolynomial = inequalities.construct_homogeneous_cone().HilbertQuasiPolynomial()
print([evaluate_quasipolynomial(quasipolynomial, n) for n in range(10)])

Explanation

The PyNormaliz_inequalities package provides a convenient interface to PyNormaliz, allowing users to specify inequalities in a natural format. It supports creating variables, expressions, and inequalities, and converting them to vector representations suitable for PyNormaliz. The package also includes functionality to construct homogeneous cones and compute Hilbert quasi-polynomials.

The main components of the package are:

  • Variable: Represents a variable in an inequality.
  • Expression: Represents a linear expression involving variables.
  • Inequality: Represents an inequality involving expressions.
  • InequalitySystem: Manages a system of inequalities and provides methods to interact with PyNormaliz.

The package also includes utility functions for converting inequalities to vector representations and evaluating quasi-polynomials.

Metadata

Release files for PyNormaliz-inequalities 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PyNormaliz-inequalities 0.1.2
File Size Uploaded
pynormaliz_inequalities-0.1.2.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for PyNormaliz-inequalities 0.1.2
File Interpreter ABI Platform
PyNormaliz_inequalities-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.1 kB

Release files / pynormaliz_inequalities-0.1.2.tar.gz

Download URL pynormaliz_inequalities-0.1.2.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
04e8f56158e7727bf01a3bbd041dfe25872e0c5ef4754402a1888cb072ad33a4
BLAKE2b-256 checksum
How to use checksums
b097f1aa97c33424f859dbf2ffbfb8d21a8358c74c106920ef9bed9c9c8141b9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release files / PyNormaliz_inequalities-0.1.2-py3-none-any.whl

Download URL PyNormaliz_inequalities-0.1.2-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
079622af75279191a734076e1960b3cabecdf7cd97ec996b9aa00cd1ac16141e
BLAKE2b-256 checksum
How to use checksums
6e27f6c1bd2dfc5df24f363f717da35e4126203cd0e27d2ca1ed8bbe0c7d3141
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 17, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page