The Python backend, using number fields internally#
- class sage.geometry.polyhedron.backend_number_field.Polyhedron_number_field(parent, Vrep, Hrep, Vrep_minimal=None, Hrep_minimal=None, pref_rep=None, mutable=False, **kwds)#
Bases:
Polyhedron_field
,Polyhedron_base_number_field
Polyhedra whose data can be converted to number field elements
All computations are done internally using a fixed real embedded number field, which is determined automatically.
INPUT:
Vrep
– a list[vertices, rays, lines]
orNone
.Hrep
– a list[ieqs, eqns]
orNone
.
EXAMPLES:
sage: P = Polyhedron(vertices=[[1], [sqrt(2)]], backend='number_field') # optional - sage.rings.number_field sage: P # optional - sage.rings.number_field A 1-dimensional polyhedron in (Symbolic Ring)^1 defined as the convex hull of 2 vertices sage: P.vertices() # optional - sage.rings.number_field (A vertex at (1), A vertex at (sqrt(2))) sage: P = polytopes.icosahedron(exact=True, backend='number_field') # optional - sage.rings.number_field sage: P # optional - sage.rings.number_field A 3-dimensional polyhedron in (Number Field in sqrt5 with defining polynomial x^2 - 5 with sqrt5 = 2.236067977499790?)^3 defined as the convex hull of 12 vertices sage: x = polygen(ZZ); P = Polyhedron( # optional - sage.rings.number_field ....: vertices=[[sqrt(2)], [AA.polynomial_root(x^3-2, RIF(0,3))]], ....: backend='number_field') sage: P # optional - sage.rings.number_field A 1-dimensional polyhedron in (Symbolic Ring)^1 defined as the convex hull of 2 vertices sage: P.vertices() # optional - sage.rings.number_field (A vertex at (sqrt(2)), A vertex at (2^(1/3)))