From bacc3e88dde6cea6f99d4dbd631acb8d0bb55a94 Mon Sep 17 00:00:00 2001 From: Jonathan Kliem Date: Sat, 16 Jan 2021 21:33:30 +0100 Subject: [PATCH] improved documentation --- src/sage/geometry/polyhedron/base.py | 19 ++++++++++++++++--- .../face_iterator.pyx | 18 +++++++++--------- 2 files changed, 25 insertions(+), 12 deletions(-) diff --git a/src/sage/geometry/polyhedron/base.py b/src/sage/geometry/polyhedron/base.py index c23f4afc820..4a6f84ebb96 100644 --- a/src/sage/geometry/polyhedron/base.py +++ b/src/sage/geometry/polyhedron/base.py @@ -7038,7 +7038,8 @@ def meet_of_facets(self, *facets): TESTS: - The offset is taken correctly:: + Equations are not considered by the combinatorial polyhedron. + We check that the index corresponds to the Hrepresentation index:: sage: P = polytopes.permutahedron(3, backend='field') sage: P.Hrepresentation() @@ -7049,8 +7050,20 @@ def meet_of_facets(self, *facets): An inequality (1, 0, 1) x - 3 >= 0, An inequality (1, 1, 0) x - 3 >= 0, An equation (1, 1, 1) x - 6 == 0) - sage: P.meet_of_facets(0) - A 1-dimensional face of a Polyhedron in QQ^3 defined as the convex hull of 2 vertices + sage: P.meet_of_facets(0).ambient_Hrepresentation() + (An equation (1, 1, 1) x - 6 == 0, An inequality (0, 0, 1) x - 1 >= 0) + + sage: P = polytopes.permutahedron(3, backend='ppl') + sage: P.Hrepresentation() + (An equation (1, 1, 1) x - 6 == 0, + An inequality (1, 1, 0) x - 3 >= 0, + An inequality (-1, -1, 0) x + 5 >= 0, + An inequality (0, 1, 0) x - 1 >= 0, + An inequality (-1, 0, 0) x + 3 >= 0, + An inequality (1, 0, 0) x - 1 >= 0, + An inequality (0, -1, 0) x + 3 >= 0) + sage: P.meet_of_facets(1).ambient_Hrepresentation() + (An equation (1, 1, 1) x - 6 == 0, An inequality (1, 1, 0) x - 3 >= 0) """ from sage.geometry.polyhedron.representation import Inequality from sage.geometry.polyhedron.face import PolyhedronFace diff --git a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx index 045abf26f89..ccf31c6ee9e 100644 --- a/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx +++ b/src/sage/geometry/polyhedron/combinatorial_polyhedron/face_iterator.pyx @@ -488,7 +488,7 @@ cdef class FaceIterator_base(SageObject): This is the largest face contained in all facets with the given indices. - The iterator must be reseted if not newly initialized. + The iterator must be reset if not newly initialized. EXAMPLES:: @@ -528,7 +528,7 @@ cdef class FaceIterator_base(SageObject): ... IndexError: coatoms out of range - If the iterator has already been used, it must be reseted before:: + If the iterator has already been used, it must be reset before:: sage: P = polytopes.dodecahedron() sage: it = P.face_generator() @@ -555,11 +555,11 @@ cdef class FaceIterator_base(SageObject): This is the smallest face containing all Vrepresentatives with the given indices. - The iterator must be reseted if not newly initialized. + The iterator must be reset if not newly initialized. .. NOTE:: - In case of unbounded polyhedra, the smallest face containing given Vrepresentatives + In the case of unbounded polyhedra, the smallest face containing given Vrepresentatives may not te well defined. EXAMPLES:: @@ -590,7 +590,7 @@ cdef class FaceIterator_base(SageObject): ... IndexError: coatoms out of range - If the iterator has already been used, it must be reseted before:: + If the iterator has already been used, it must be reset before:: sage: P = polytopes.dodecahedron() sage: it = P.face_generator() @@ -605,7 +605,7 @@ cdef class FaceIterator_base(SageObject): sage: it.join_of_Vrep(1,10).ambient_V_indices() (1, 10) - In case of an unbounded polyhedron, we try to make sense of the input:: + In the case of an unbounded polyhedron, we try to make sense of the input:: sage: P = polytopes.cube()*Polyhedron(lines=[[1]]) sage: it = P.face_generator() @@ -647,7 +647,7 @@ cdef class FaceIterator_base(SageObject): r""" Construct the meet of the coatoms indicated by the indices. - The iterator must be reseted if not newly initialized. + The iterator must be reset if not newly initialized. .. SEEALSO:: @@ -755,7 +755,7 @@ cdef class FaceIterator_base(SageObject): r""" Construct the join of atoms indicated by the indices. - The iterator must be reseted if not newly initialized. + The iterator must be reset if not newly initialized. .. SEEALSO:: @@ -786,7 +786,7 @@ cdef class FaceIterator_base(SageObject): sage: it._join_of_atoms(1) A 0-dimensional face of a Polyhedron in ZZ^3 defined as the convex hull of 1 vertex - If the iterator has already been used, it must be reseted before:: + If the iterator has already been used, it must be reset before:: sage: P = polytopes.dodecahedron() sage: it = P.face_generator()