File: Readme.md

package info (click to toggle)
normaliz 3.6.3%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 25,880 kB
  • sloc: cpp: 37,346; makefile: 1,611; python: 596
file content (85 lines) | stat: -rw-r--r-- 2,876 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# 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.ipynb) by Richard Sieg.

Its sibling [PyQNormaliz](https://github.com/Normaliz/PyQNormaliz) is a python interface to QNormaliz.

## Requirements

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

The source packages of the Normaliz realeases contain PyNormaliz and PyQNormaliz.

## Installation

The PyNormaliz install script assumes that you have executed the
```
install_normaliz_with_qnormaliz_eantic.sh
```
script. To install PyNormaliz and PyQNormaliz navigate to the Normaliz directory and type
```
./install_pynormaliz.sh --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")