Skip to main content

An interface to Normaliz

Project description

# PyNormaliz - An interface to Normaliz


## What is PyNormaliz

PyNormaliz provides an interface to Normaliz (https://www.normaliz.uni-osnabrueck.de) via libNormaliz. It offers the complete functionality of Normaliz, and can be used interactively from python. For a first example, see [this introduction](doc/PyNormaliz_Tutorial.pdf) by Richard Sieg.


## Requirements

* python 2.7 or higher or python 3.4 or higher
* Normaliz 3.2.1 or higher (https://github.com/Normaliz/Normaliz/releases)

The source packages of the Normaliz realeases contains PyNormaliz.

## Installation

The PyNormaliz install script assumes that you have executed the
```
install_normaliz_with_qnormaliz_eantic.sh
```
script. To install PyNormaliz and navigate to the Normaliz directory and type
```
python setup.py install --user
```

The script can be customized by some options. See Appendix E of the [Normaliz manual](https://github.com/Normaliz/Normaliz/blob/master/doc/Normaliz.pdf).

## Usage

The main command is Cone to create a cone, and the member functions
of the cone class to compute properties. For a full list of input and output
properties, see the Normaliz manual.

To create a cone, use
```
import PyNormaliz
C = PyNormaliz.Cone(cone = [[1,0],[0,1]])
```

All possible Normaliz input types can be given as keyword arguments.

To compute a property of the cone, use the provided getters, which correspond to Normaliz computation goals.

```
C.HilbertBasis()
```

You can pass options to the compute functions
```
C.HilbertSeries(HSOP = True)
```

## Low level commands

There is also a low-level API, directly using C functions:

To create a cone, use
```
C = NmzCone("cone", [[1,0],[0,1]])
```
or, equivalently,
```
C = NmzCone(["cone", [[1,0],[0,1]]])
```
NmzCone can take an arbitrary number of arguments, either as separated arguments or in a list. First is always a string, describing an input property for Normaliz, followed by a (possibly empty) matrix.

NmzCompute takes a cone as first argument, followed by arbitrary many strings, or a list of strings, describing Normaliz output types. NmzCompute lets Normaliz compute the necessary values, and returns true if everything was computed properly, false otherwise.
```
NmzCompute(C, "HilbertBasis")
```
or
```
NmzCompute(C, ["HilbertBasis"])
```

NmzIsComputed takes a cone and a string representing an output property, and returns true if the property is already computed for the cone, false otherwise. (In contrast to NmzCompute it does not start a computation.)
```
NmzIsComputed(C, "HilbertBasis")
```

NmzResult takes a cone and a string representing an output property, and returns the computed value of this property as a matrix, a list, or as a bool.
```
NmzResult(C, "HilbertBasis")

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

PyNormaliz-2.4.tar.gz (211.3 kB view details)

Uploaded Source

File details

Details for the file PyNormaliz-2.4.tar.gz.

File metadata

  • Download URL: PyNormaliz-2.4.tar.gz
  • Upload date:
  • Size: 211.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for PyNormaliz-2.4.tar.gz
Algorithm Hash digest
SHA256 ac7ceda978edf01dedc5c3b8483b8e91a4f9bc124a1683b99c7ec0893e328ce6
MD5 8ebc08b3efb4df512fe98c56b7f2e416
BLAKE2b-256 bd7aa359c5d9df9a062037ed012077450e49447e35d12764ec935a96b02c04f7

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