code
stringlengths
17
6.64M
class Polyhedron_RDF_cdd(Polyhedron_cdd, Polyhedron_RDF): "\n Polyhedra over RDF with cdd\n\n INPUT:\n\n - ``ambient_dim`` -- integer. The dimension of the ambient space.\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``.\n\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``.\n\n ...
class Polyhedron_field(Polyhedron_base): "\n Polyhedra over all fields supported by Sage\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``.\n\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``.\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(AA(2).sqrt(),0...
def _format_function_call(fn_name, *v, **k): '\n Return a Python function call as a string.\n\n Keywords are sorted.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.backend_normaliz import _format_function_call\n sage: _format_function_call(\'foo\', 17, hellooooo=\'goodbyeeee\')\n ...
class Polyhedron_normaliz(Polyhedron_base_number_field): "\n Polyhedra with normaliz\n\n INPUT:\n\n - ``parent`` -- :class:`~sage.geometry.polyhedron.parent.Polyhedra`\n the parent\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``; the\n V-representation of the polyhedron; if ...
class Polyhedron_QQ_normaliz(Polyhedron_normaliz, Polyhedron_QQ): "\n Polyhedra over `\\QQ` with normaliz.\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0), ...
class Polyhedron_ZZ_normaliz(Polyhedron_QQ_normaliz, Polyhedron_ZZ): "\n Polyhedra over `\\ZZ` with normaliz.\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0...
class Polyhedron_number_field(Polyhedron_field, Polyhedron_base_number_field): "\n Polyhedra whose data can be converted to number field elements\n\n All computations are done internally using a fixed real embedded number field,\n which is determined automatically.\n\n INPUT:\n\n - ``Vrep`` -- a li...
class Polyhedron_polymake(Polyhedron_base): "\n Polyhedra with polymake\n\n INPUT:\n\n - ``parent`` -- :class:`~sage.geometry.polyhedron.parent.Polyhedra`\n the parent\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``; the\n V-representation of the polyhedron; if ``None``, the...
class Polyhedron_QQ_polymake(Polyhedron_polymake, Polyhedron_QQ): "\n Polyhedra over `\\QQ` with polymake.\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(...
class Polyhedron_ZZ_polymake(Polyhedron_polymake, Polyhedron_ZZ): "\n Polyhedra over `\\ZZ` with polymake.\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(...
class Polyhedron_ppl(Polyhedron_mutable): "\n Polyhedra with ppl\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``.\n\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``.\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)], rays=[(1,1)], lines=[], b...
class Polyhedron_QQ_ppl(Polyhedron_ppl, Polyhedron_QQ): "\n Polyhedra over `\\QQ` with ppl\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``.\n\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``.\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)],...
class Polyhedron_ZZ_ppl(Polyhedron_ppl, Polyhedron_ZZ): "\n Polyhedra over `\\ZZ` with ppl\n\n INPUT:\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``.\n\n - ``Hrep`` -- a list ``[ieqs, eqns]`` or ``None``.\n\n EXAMPLES::\n\n sage: p = Polyhedron(vertices=[(0,0),(1,0),(0,1)],...
def is_Polyhedron(X): '\n Test whether ``X`` is a Polyhedron.\n\n INPUT:\n\n - ``X`` -- anything.\n\n OUTPUT:\n\n Boolean.\n\n EXAMPLES::\n\n sage: p = polytopes.hypercube(2)\n sage: from sage.geometry.polyhedron.base import is_Polyhedron\n sage: is_Polyhedron(p)\n Tr...
class Polyhedron_base(Polyhedron_base7): "\n Base class for Polyhedron objects\n\n INPUT:\n\n - ``parent`` -- the parent, an instance of\n :class:`~sage.geometry.polyhedron.parent.Polyhedra`.\n\n - ``Vrep`` -- a list ``[vertices, rays, lines]`` or ``None``. The\n V-representation of the poly...
class Polyhedron_base0(Element, sage.geometry.abc.Polyhedron): "\n Initialization and basic access for polyhedra.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base0 import Polyhedron_base0\n sage: P = Polyhedron(rays=[[1...
class Polyhedron_base1(Polyhedron_base0, ConvexSet_closed): "\n Convex set methods for polyhedra,\n but not constructions such as dilation or product.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base1 import Polyhedron_base...
class Polyhedron_base2(Polyhedron_base1): '\n Methods related to lattice points.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base2 import Polyhedron_base2\n sage: P = polytopes.cube()\n sage: Polyhedron_base2.is_...
class Polyhedron_base3(Polyhedron_base2): '\n Methods related to the combinatorics of a polyhedron.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base3 import Polyhedron_base3\n sage: P = polytopes.cube()\n sage: P...
class Polyhedron_base4(Polyhedron_base3): "\n Methods relying on :mod:`sage.graphs`.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base4 import Polyhedron_base4\n sage: P = polytopes.cube()\n sage: Polyhedron_base4...
class Polyhedron_base5(Polyhedron_base4): '\n Methods constructing new polyhedra\n except for affine hull and affine hull projection.\n\n See :class:`sage.geometry.polyhedron.base.Polyhedron_base`.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base5 import Polyhedron_base5\n sage: ...
class Polyhedron_base6(Polyhedron_base5): "\n Methods related to plotting including affine hull projection.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.base6 import Polyhedron_base6\n sage: P = polytopes.cube()\n sage: Polyhedron_base6.plot(P) ...
class Polyhedron_base7(Polyhedron_base6): "\n Methods related to triangulation and volume.\n\n TESTS::\n\n sage: # needs sage.combinat\n sage: from sage.geometry.polyhedron.base7 import Polyhedron_base7\n sage: P = polytopes.associahedron(['A', 3])\n sage: Polyhedron_base7.centro...
class Polyhedron_QQ(Polyhedron_base): '\n Base class for Polyhedra over `\\QQ`\n\n TESTS::\n\n sage: p = Polyhedron([(0,0)], base_ring=QQ); p\n A 0-dimensional polyhedron in QQ^2 defined as the convex hull of 1 vertex\n sage: TestSuite(p).run()\n ' def _is_zero(self, x): ...
class Polyhedron_RDF(Polyhedron_base): '\n Base class for polyhedra over ``RDF``.\n\n TESTS::\n\n sage: p = Polyhedron([(0,0)], base_ring=RDF); p\n A 0-dimensional polyhedron in RDF^2 defined as the convex hull of 1 vertex\n sage: TestSuite(p).run()\n ' def _is_zero(self, x): ...
class Polyhedron_ZZ(Polyhedron_QQ): '\n Base class for Polyhedra over `\\ZZ`\n\n TESTS::\n\n sage: p = Polyhedron([(0,0)], base_ring=ZZ); p\n A 0-dimensional polyhedron in ZZ^2 defined as the convex hull of 1 vertex\n sage: TestSuite(p).run()\n ' _base_ring = ZZ def __getat...
class Polyhedron_mutable(Polyhedron_base): '\n Base class for polyhedra that allow mutability.\n\n This should not be used directly.\n ' def __hash__(self): '\n TESTS::\n\n sage: p = Polyhedron([[1, 1]], mutable=True)\n sage: set([p])\n Traceback (most...
def _number_field_elements_from_algebraics_list_of_lists_of_lists(listss, **kwds): '\n Like `number_field_elements_from_algebraics`, but for a list of lists of lists.\n\n EXAMPLES::\n\n sage: rt2 = AA(sqrt(2)); rt2 # needs sage.rings.number_field sag...
class Polyhedron_base_number_field(Polyhedron_base): def _compute_data_lists_and_internal_base_ring(self, data_lists, convert_QQ, convert_NF): "\n Compute data lists in Normaliz or ``number_field`` backend format and the internal base ring of the data.\n\n EXAMPLES::\n\n sage: # ...
def cdd_Vrepresentation(cdd_type, vertices, rays, lines, file_output=None): "\n Return a string containing the V-representation in cddlib's ext format.\n\n INPUT:\n\n - ``file_output`` (string; optional) -- a filename to which the\n representation should be written. If set to ``None`` (default),\n ...
def cdd_Hrepresentation(cdd_type, ieqs, eqns, file_output=None): "\n Return a string containing the H-representation in cddlib's ine format.\n\n INPUT:\n\n - ``file_output`` (string; optional) -- a filename to which the\n representation should be written. If set to ``None`` (default),\n represe...
def Polyhedron(vertices=None, rays=None, lines=None, ieqs=None, eqns=None, ambient_dim=None, base_ring=None, minimize=True, verbose=False, backend=None, mutable=False): '\n Construct a polyhedron object.\n\n You may either define it with vertex/ray/line or\n inequalities/equations data, but not both. Red...
def random_inequalities(d, n): '\n Random collections of inequalities for testing purposes.\n\n INPUT:\n\n - ``d`` -- integer. The dimension.\n\n - ``n`` -- integer. The number of random inequalities to generate.\n\n OUTPUT:\n\n A random set of inequalities as a :class:`StandardAlgorithm` insta...
class DoubleDescriptionPair(): def __init__(self, problem, A_rows, R_cols): '\n Base class for a double description pair `(A, R)`\n\n .. warning::\n\n You should use the :meth:`Problem.initial_pair` or\n :meth:`Problem.run` to generate double description pairs\n ...
class Problem(): pair_class = DoubleDescriptionPair def __init__(self, A): '\n Base class for implementations of the double description algorithm\n\n It does not make sense to instantiate the base class directly,\n it just provides helpers for implementations.\n\n INPUT:\n...
class StandardDoubleDescriptionPair(DoubleDescriptionPair): '\n Double description pair for the "Standard Algorithm".\n\n See :class:`StandardAlgorithm`.\n\n TESTS::\n\n sage: A = matrix([(-1, 1, 0), (-1, 2, 1), (1/2, -1/2, -1)])\n sage: from sage.geometry.polyhedron.double_description impo...
class StandardAlgorithm(Problem): '\n Standard implementation of the double description algorithm\n\n See [FP1996]_ for the definition of the "Standard\n Algorithm".\n\n EXAMPLES::\n\n sage: A = matrix(QQ, [(1, 1), (-1, 1)])\n sage: from sage.geometry.polyhedron.double_description import...
class PivotedInequalities(SageObject): def __init__(self, base_ring, dim): '\n Base class for inequalities that may contain linear subspaces\n\n INPUT:\n\n - ``base_ring`` -- a field.\n\n - ``dim`` -- integer. The ambient space dimension.\n\n EXAMPLES::\n\n s...
class Hrep2Vrep(PivotedInequalities): def __init__(self, base_ring, dim, inequalities, equations): '\n Convert H-representation to a minimal V-representation.\n\n INPUT:\n\n - ``base_ring`` -- a field.\n\n - ``dim`` -- integer. The ambient space dimension.\n\n - ``inequ...
class Vrep2Hrep(PivotedInequalities): def __init__(self, base_ring, dim, vertices, rays, lines): '\n Convert V-representation to a minimal H-representation.\n\n INPUT:\n\n - ``base_ring`` -- a field.\n\n - ``dim`` -- integer. The ambient space dimension.\n\n - ``vertice...
@richcmp_method class PolyhedronFace(ConvexSet_closed): '\n A face of a polyhedron.\n\n This class is for use in\n :meth:`~sage.geometry.polyhedron.base.Polyhedron_base.face_lattice`.\n\n INPUT:\n\n No checking is performed whether the H/V-representation indices\n actually determine a face of th...
def combinatorial_face_to_polyhedral_face(polyhedron, combinatorial_face): "\n Convert a combinatorial face to a face of a polyhedron.\n\n INPUT:\n\n - ``polyhedron`` -- a polyhedron containing ``combinatorial_face``\n - ``combinatorial_face`` -- a :class:`CombinatorialFace`\n\n OUTPUT: a :class:`P...
def generating_function_of_integral_points(polyhedron, split=False, result_as_tuple=None, name=None, names=None, **kwds): "\n Return the multivariate generating function of the\n integral points of the ``polyhedron``.\n\n To be precise, this returns\n\n .. MATH::\n\n \\sum_{(r_0,\\dots,r_{d-1})...
def _generating_function_of_integral_points_(polyhedron, indices=None, **kwds): '\n Helper function for :func:`generating_function_of_integral_points` which\n does the mid-level stuff.\n\n TESTS::\n\n sage: from sage.geometry.polyhedron.generating_function import generating_function_of_integral_po...
def __generating_function_of_integral_points__(indices, inequalities, equations, mod, name, Factorization_sort=False, Factorization_simplify=False, sort_factors=False): "\n Helper function for :func:`generating_function_of_integral_points` which\n does the actual computation of the generating function.\n\n ...
def _generating_function_via_Omega_(inequalities, B, skip_indices=()): "\n Compute the generating function of the integral points of the\n polyhedron specified by ``inequalities`` via\n :func:`MacMahon's Omega operator <sage.rings.polynomial.omega.MacMahonOmega>`.\n\n INPUT:\n\n - ``inequalities`` ...
class _TransformHrepresentation(): '\n An abstract base class for transformations of the\n Hrepresentation of a polyhedron together with its\n back-substitutions of the corresponding generating function.\n\n INPUT:\n\n - ``inequalities`` -- a list of tuples of numbers\n\n - ``equations`` -- a li...
class _SplitOffSimpleInequalities(_TransformHrepresentation): "\n Split off (simple) inequalities which can be handled better\n without passing them to Omega.\n\n INPUT:\n\n - ``inequalities`` -- a list of tuples of numbers\n\n - ``equations`` -- a list of tuples of numbers\n\n - ``B`` -- a Laur...
class _EliminateByEquations(_TransformHrepresentation): '\n Prepare the substitutions coming from "eliminated" variables\n in the given equations.\n\n INPUT:\n\n - ``inequalities`` -- a list of tuples of numbers\n\n - ``equations`` -- a list of tuples of numbers\n\n - ``B`` -- a Laurent polynomi...
class _TransformMod(_TransformHrepresentation): "\n Prepare the substitutions coming from the moduli.\n\n INPUT:\n\n - ``inequalities`` -- a list of tuples of numbers\n\n - ``equations`` -- a list of tuples of numbers\n\n - ``B`` -- a Laurent polynomial ring\n\n - ``mod`` -- a dictionary mapping...
def _compositions_mod(u, m, r=0, multidimensional=False): "\n Return an iterable of all tuples `a` such that `a u^T \\equiv r \\mod m`.\n\n INPUT:\n\n - ``m`` -- the modulus as a positive integer\n\n - ``multidimensional`` -- (default: ``False``) a boolean\n\n If ``multidimensional=False``:\n\n ...
class LatticePolytopeError(Exception): '\n Base class for errors from lattice polytopes\n ' pass
class LatticePolytopesNotIsomorphicError(LatticePolytopeError): '\n Raised when two lattice polytopes are not isomorphic.\n ' pass
class LatticePolytopeNoEmbeddingError(LatticePolytopeError): '\n Raised when no embedding of the desired kind can be found.\n ' pass
class LatticeEuclideanGroupElement(SageObject): def __init__(self, A, b): '\n An element of the lattice Euclidean group.\n\n Note that this is just intended as a container for results from\n LatticePolytope_PPL. There is no group-theoretic functionality to\n speak of.\n\n ...
def zero_sum_projection(d, base_ring=None): '\n Return a matrix corresponding to the projection on the orthogonal of\n `(1,1,\\ldots,1)` in dimension `d`.\n\n The projection maps the orthonormal basis `(1,-1,0,\\ldots,0) / \\sqrt(2)`,\n `(1,1,-1,0,\\ldots,0) / \\sqrt(3)`, \\ldots, `(1,1,\\ldots,1,-1) ...
def project_points(*points, **kwds): '\n Projects a set of points into a vector space of dimension one less.\n\n INPUT:\n\n - ``points``... -- the points to project.\n\n - ``base_ring`` -- (defaults to ``RDF`` if keyword is ``None`` or not\n provided in ``kwds``) the base ring to use.\n\n The ...
def gale_transform_to_polytope(vectors, base_ring=None, backend=None): "\n Return the polytope associated to the list of vectors forming a Gale transform.\n\n This function is the inverse of\n :meth:`~sage.geometry.polyhedron.base.Polyhedron_base.gale_transform`\n up to projective transformation.\n\n ...
def gale_transform_to_primal(vectors, base_ring=None, backend=None): "\n Return a point configuration dual to a totally cyclic vector configuration.\n\n This is the dehomogenized vector configuration dual to the input.\n The dual vector configuration is acyclic and can therefore\n be dehomogenized as ...
class Polytopes(): '\n A class of constructors for commonly used, famous, or interesting\n polytopes.\n ' def regular_polygon(self, n, exact=True, base_ring=None, backend=None): "\n Return a regular polygon with `n` vertices.\n\n INPUT:\n\n - ``n`` -- a positive integer,...
def _to_space_separated_string(l, base_ring=None): "\n Convert a container to a space-separated string.\n\n INPUT:\n\n - ``l`` -- anything iterable.\n\n - ``base_ring`` -- ring (default: ``None``); convert this ring, if given\n\n OUTPUT:\n\n String.\n\n EXAMPLES::\n\n sage: import sage...
def _set_to_None_if_empty(x): '\n Helper function to clean up arguments.\n\n This returns None if x is None or x is an empty container.\n\n EXAMPLES::\n\n sage: import sage.geometry.polyhedron.misc as P\n sage: None == P._set_to_None_if_empty([])\n True\n sage: P._set_to_None_...
def _make_listlist(x): '\n Helper function to clean up arguments.\n\n INPUT:\n\n - ``x`` -- ``None`` or an iterable of iterables.\n\n OUTPUT:\n\n A list of lists.\n\n EXAMPLES::\n\n sage: import sage.geometry.polyhedron.misc as P\n sage: [] == P._make_listlist(tuple())\n Tru...
def _common_length_of(l1, l2=None, l3=None): '\n The arguments are containers or ``None``. The function applies\n ``len()`` to each element, and returns the common length. If the\n length differs, ``ValueError`` is raised. Used to check arguments.\n\n OUTPUT:\n\n A tuple (number of entries, common ...
class FormalPolyhedraModule(CombinatorialFreeModule): '\n Class for formal modules generated by polyhedra.\n\n It is formal because it is free -- it does not know\n about linear relations of polyhedra.\n\n A formal polyhedral module is graded by dimension.\n\n INPUT:\n\n - ``base_ring`` -- base ...
class PALPreader(SageObject): "\n Read PALP database of polytopes.\n\n\n INPUT:\n\n - ``dim`` -- integer. The dimension of the polyhedra\n\n - ``data_basename`` -- string or ``None`` (default). The directory\n and database base filename (PALP usually uses ``'zzdb'``) name\n containing the PA...
class Reflexive4dHodge(PALPreader): '\n Read the PALP database for Hodge numbers of 4d polytopes.\n\n The database is very large and not installed by default. You can\n install it with the shell command ``sage -i polytopes_db_4d``.\n\n INPUT:\n\n - ``h11``, ``h21`` -- Integers. The Hodge numbers of...
def Polyhedra(ambient_space_or_base_ring=None, ambient_dim=None, backend=None, *, ambient_space=None, base_ring=None): '\n Construct a suitable parent class for polyhedra\n\n INPUT:\n\n - ``base_ring`` -- A ring. Currently there are backends for `\\ZZ`,\n `\\QQ`, and `\\RDF`.\n\n - ``ambient_dim`...
class Polyhedra_base(UniqueRepresentation, Parent): '\n Polyhedra in a fixed ambient space.\n\n INPUT:\n\n - ``base_ring`` -- either ``ZZ``, ``QQ``, or ``RDF``. The base\n ring of the ambient module/vector space.\n\n - ``ambient_dim`` -- integer. The ambient space dimension.\n\n - ``backend`` ...
class Polyhedra_ZZ_ppl(Polyhedra_base): Element = Polyhedron_ZZ_ppl def _element_constructor_polyhedron(self, polyhedron, **kwds): "\n The element (polyhedron) constructor for the case of 1 argument, a polyhedron.\n\n Set up with the ``ppl_polyhedron`` of ``self``, if available.\n\n ...
class Polyhedra_ZZ_normaliz(Polyhedra_base): Element = Polyhedron_ZZ_normaliz
class Polyhedra_QQ_ppl(Polyhedra_base): Element = Polyhedron_QQ_ppl def _element_constructor_polyhedron(self, polyhedron, **kwds): "\n The element (polyhedron) constructor for the case of 1 argument, a polyhedron.\n\n Set up with the ``ppl_polyhedron`` of ``self``, if available.\n\n ...
class Polyhedra_QQ_normaliz(Polyhedra_base): Element = Polyhedron_QQ_normaliz
class Polyhedra_QQ_cdd(Polyhedra_base): Element = Polyhedron_QQ_cdd
class Polyhedra_RDF_cdd(Polyhedra_base): Element = Polyhedron_RDF_cdd
class Polyhedra_normaliz(Polyhedra_base): Element = Polyhedron_normaliz
class Polyhedra_polymake(Polyhedra_base): Element = Polyhedron_polymake
class Polyhedra_field(Polyhedra_base): Element = Polyhedron_field
class Polyhedra_number_field(Polyhedra_base): Element = Polyhedron_number_field
@cached_function def does_backend_handle_base_ring(base_ring, backend): "\n Return true, if ``backend`` can handle ``base_ring``.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.parent import does_backend_handle_base_ring\n sage: does_backend_handle_base_ring(QQ, 'ppl')\n True\n ...
def cyclic_sort_vertices_2d(Vlist): '\n Return the vertices/rays in cyclic order if possible.\n\n .. NOTE::\n\n This works if and only if each vertex/ray is adjacent to exactly\n two others. For example, any 2-dimensional polyhedron satisfies\n this.\n\n See\n :meth:`~sage.geometr...
def projection_func_identity(x): '\n The identity projection.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.plot import projection_func_identity\n sage: projection_func_identity((1,2,3))\n [1, 2, 3]\n ' return list(x)
class ProjectionFuncStereographic(): '\n The stereographic (or perspective) projection onto a codimension-1 linear\n subspace with respect to a sphere centered at the origin.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.plot import ProjectionFuncStereographic\n sage: cube = polyto...
class ProjectionFuncSchlegel(): '\n The Schlegel projection from the given input point.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.plot import ProjectionFuncSchlegel\n sage: fcube = polytopes.hypercube(4)\n sage: facet = fcube.facets()[0]\n sage: proj = ProjectionFunc...
class Projection(SageObject): '\n The projection of a :class:`Polyhedron`.\n\n This class keeps track of the necessary data to plot the input\n polyhedron.\n ' def __init__(self, polyhedron, proj=projection_func_identity): "\n Initialize the projection of a Polyhedron() object.\n\n...
class LatticePolygon_PPL_class(LatticePolytope_PPL_class): '\n A lattice polygon\n\n This includes 2-dimensional polytopes as well as degenerate (0 and\n 1-dimensional) lattice polygons. Any polytope in 2d is a polygon.\n ' @cached_method def ordered_vertices(self): '\n Return ...
@cached_function def polar_P2_polytope(): '\n The polar of the `P^2` polytope\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import polar_P2_polytope\n sage: polar_P2_polytope()\n A 2-dimensional lattice polytope in ZZ^2 with 3 vertices\n sage: _.verti...
@cached_function def polar_P1xP1_polytope(): '\n The polar of the `P^1 \\times P^1` polytope\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import polar_P1xP1_polytope\n sage: polar_P1xP1_polytope()\n A 2-dimensional lattice polytope in ZZ^2 with 4 vertices\n...
@cached_function def polar_P2_112_polytope(): '\n The polar of the `P^2[1,1,2]` polytope\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import polar_P2_112_polytope\n sage: polar_P2_112_polytope()\n A 2-dimensional lattice polytope in ZZ^2 with 3 vertices\n ...
@cached_function def subpolygons_of_polar_P2(): '\n The lattice sub-polygons of the polar `P^2` polytope\n\n OUTPUT:\n\n A tuple of lattice polytopes.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import subpolygons_of_polar_P2\n sage: len(subpolygons_of_pola...
@cached_function def subpolygons_of_polar_P2_112(): '\n The lattice sub-polygons of the polar `P^2[1,1,2]` polytope\n\n OUTPUT:\n\n A tuple of lattice polytopes.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import subpolygons_of_polar_P2_112\n sage: len(subp...
@cached_function def subpolygons_of_polar_P1xP1(): '\n The lattice sub-polygons of the polar `P^1 \\times P^1` polytope\n\n OUTPUT:\n\n A tuple of lattice polytopes.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polygon import subpolygons_of_polar_P1xP1\n sage: len(s...
@cached_function def sub_reflexive_polygons(): '\n Return all lattice sub-polygons of reflexive polygons.\n\n OUTPUT:\n\n A tuple of all lattice sub-polygons. Each sub-polygon is returned\n as a pair sub-polygon, containing reflexive polygon.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyh...
def _class_for_LatticePolytope(dim): "\n Return the appropriate class in the given dimension.\n\n Helper function for :func:`LatticePolytope_PPL`. You should not\n have to use this function manually.\n\n INPUT:\n\n - ``dim`` -- integer. The ambient space dimension.\n\n OUTPUT:\n\n The appropr...
def LatticePolytope_PPL(*args): '\n Construct a new instance of the PPL-based lattice polytope class.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polytope import LatticePolytope_PPL\n sage: LatticePolytope_PPL((0,0), (1,0), (0,1))\n A 2-dimensional lattice polytop...
class LatticePolytope_PPL_class(C_Polyhedron): '\n The lattice polytope class.\n\n You should use :func:`LatticePolytope_PPL` to construct instances.\n\n EXAMPLES::\n\n sage: from sage.geometry.polyhedron.ppl_lattice_polytope import LatticePolytope_PPL\n sage: LatticePolytope_PPL((0,0), (1,...
@richcmp_method class PolyhedronRepresentation(SageObject): '\n The internal base class for all representation objects of\n ``Polyhedron`` (vertices/rays/lines and inequalities/equations)\n\n .. note::\n\n You should not (and cannot) instantiate it yourself. You can\n only obtain them from ...
class Hrepresentation(PolyhedronRepresentation): '\n The internal base class for H-representation objects of\n a polyhedron. Inherits from ``PolyhedronRepresentation``.\n ' def __init__(self, polyhedron_parent): "\n Initializes the PolyhedronRepresentation object.\n\n TESTS::\n...
class Inequality(Hrepresentation): '\n A linear inequality (supporting hyperplane) of the\n polyhedron. Inherits from ``Hrepresentation``.\n ' def type(self): '\n Return the type (equation/inequality/vertex/ray/line) as an\n integer.\n\n OUTPUT:\n\n Integer. One o...
class Equation(Hrepresentation): '\n A linear equation of the polyhedron. That is, the polyhedron is\n strictly smaller-dimensional than the ambient space, and contained\n in this hyperplane. Inherits from ``Hrepresentation``.\n ' def type(self): '\n Return the type (equation/inequ...