Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
improved documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonathan Kliem committed Jun 19, 2021
1 parent 510bbc6 commit bacc3e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
19 changes: 16 additions & 3 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand Down Expand Up @@ -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()
Expand All @@ -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::
Expand Down Expand Up @@ -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()
Expand All @@ -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()
Expand Down Expand Up @@ -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::
Expand Down Expand Up @@ -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::
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit bacc3e8

Please sign in to comment.