The PPL (Parma Polyhedra Library) backend for polyhedral computations

class sage.geometry.polyhedron.backend_ppl.Polyhedron_QQ_ppl(parent, Vrep, Hrep, Vrep_minimal=None, Hrep_minimal=None, pref_rep=None, **kwds)

Bases: sage.geometry.polyhedron.backend_ppl.Polyhedron_ppl, sage.geometry.polyhedron.base_QQ.Polyhedron_QQ

Polyhedra over \(\QQ\) with ppl

INPUT:

  • Vrep – a list [vertices, rays, lines] or None.
  • Hrep – a list [ieqs, eqns] or None.

EXAMPLES:

sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], rays=[(1,1)], lines=[],
....:                backend='ppl', base_ring=QQ)
sage: TestSuite(p).run(skip='_test_pickling')
class sage.geometry.polyhedron.backend_ppl.Polyhedron_ZZ_ppl(parent, Vrep, Hrep, Vrep_minimal=None, Hrep_minimal=None, pref_rep=None, **kwds)

Bases: sage.geometry.polyhedron.backend_ppl.Polyhedron_ppl, sage.geometry.polyhedron.base_ZZ.Polyhedron_ZZ

Polyhedra over \(\ZZ\) with ppl

INPUT:

  • Vrep – a list [vertices, rays, lines] or None.
  • Hrep – a list [ieqs, eqns] or None.

EXAMPLES:

sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], rays=[(1,1)], lines=[],
....:                backend='ppl', base_ring=ZZ)
sage: TestSuite(p).run(skip='_test_pickling')
class sage.geometry.polyhedron.backend_ppl.Polyhedron_ppl(parent, Vrep, Hrep, Vrep_minimal=None, Hrep_minimal=None, pref_rep=None, **kwds)

Bases: sage.geometry.polyhedron.base.Polyhedron_base

Polyhedra with ppl

INPUT:

  • Vrep – a list [vertices, rays, lines] or None.
  • Hrep – a list [ieqs, eqns] or None.

EXAMPLES:

sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], rays=[(1,1)], lines=[], backend='ppl')
sage: TestSuite(p).run()
sage.geometry.polyhedron.backend_ppl.line(*args, **kwds)

Construct a line.

INPUT:

  • expression – a Linear_Expression or something convertible to it (Variable or integer).

OUTPUT:

A new Generator representing the line.

Raises a ValueError` if the homogeneous part of ``expression represents the origin of the vector space.

Examples:

>>> from ppl import Generator, Variable
>>> y = Variable(1)
>>> Generator.line(2*y)
line(0, 1)
>>> Generator.line(y)
line(0, 1)
>>> Generator.line(1)
Traceback (most recent call last):
...
ValueError: PPL::line(e):
e == 0, but the origin cannot be a line.
sage.geometry.polyhedron.backend_ppl.point(*args, **kwds)

Construct a point.

INPUT:

  • expression – a Linear_Expression or something convertible to it (Variable or integer).
  • divisor – an integer.

OUTPUT:

A new Generator representing the point.

Raises a ValueError` if ``divisor==0.

Examples:

>>> from ppl import Generator, Variable
>>> y = Variable(1)
>>> Generator.point(2*y+7, 3)
point(0/3, 2/3)
>>> Generator.point(y+7, 3)
point(0/3, 1/3)
>>> Generator.point(7, 3)
point()
>>> Generator.point(0, 0)
Traceback (most recent call last):
...
ValueError: PPL::point(e, d):
d == 0.
sage.geometry.polyhedron.backend_ppl.ray(*args, **kwds)

Construct a ray.

INPUT:

  • expression – a Linear_Expression or something convertible to it (Variable or integer).

OUTPUT:

A new Generator representing the ray.

Raises a ValueError` if the homogeneous part of ``expression represents the origin of the vector space.

Examples:

>>> from ppl import Generator, Variable
>>> y = Variable(1)
>>> Generator.ray(2*y)
ray(0, 1)
>>> Generator.ray(y)
ray(0, 1)
>>> Generator.ray(1)
Traceback (most recent call last):
...
ValueError: PPL::ray(e):
e == 0, but the origin cannot be a ray.