The PPL (Parma Polyhedra Library) backend for polyhedral computations¶
-
class
sage.geometry.polyhedron.backend_ppl.Polyhedron_QQ_ppl(parent, Vrep, Hrep, **kwds)¶ Bases:
sage.geometry.polyhedron.backend_ppl.Polyhedron_ppl,sage.geometry.polyhedron.base_QQ.Polyhedron_QQPolyhedra over \(\QQ\) with ppl
INPUT:
Vrep– a list[vertices, rays, lines]orNone.Hrep– a list[ieqs, eqns]orNone.
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, **kwds)¶ Bases:
sage.geometry.polyhedron.backend_ppl.Polyhedron_ppl,sage.geometry.polyhedron.base_ZZ.Polyhedron_ZZPolyhedra over \(\ZZ\) with ppl
INPUT:
Vrep– a list[vertices, rays, lines]orNone.Hrep– a list[ieqs, eqns]orNone.
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, **kwds)¶ Bases:
sage.geometry.polyhedron.base.Polyhedron_basePolyhedra with ppl
INPUT:
Vrep– a list[vertices, rays, lines]orNone.Hrep– a list[ieqs, eqns]orNone.
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– aLinear_Expressionor something convertible to it (Variableor integer).
OUTPUT:
A new
Generatorrepresenting the line.Raises a
ValueError` if the homogeneous part of ``expressionrepresents 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– aLinear_Expressionor something convertible to it (Variableor integer).divisor– an integer.
OUTPUT:
A new
Generatorrepresenting 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– aLinear_Expressionor something convertible to it (Variableor integer).
OUTPUT:
A new
Generatorrepresenting the ray.Raises a
ValueError` if the homogeneous part of ``expressionrepresents 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.