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

Commit

Permalink
added examples
Browse files Browse the repository at this point in the history
  • Loading branch information
nailuj-1 committed Jul 23, 2019
1 parent 691046a commit 308dada
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/sage/geometry/polyhedron/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2804,6 +2804,30 @@ def normal_fan(self, direction='inner'):
...
NotImplementedError: normal fan handles only polytopes over the rationals
sage: P = Polyhedron(vertices=[[0,0],[2,0],[0,2],[2,1],[1,2]])
sage: P.normal_fan(direction=None)
Traceback (most recent call last):
...
TypeError: the direction should be `inner` or `outer`
sage: inner_nf = P.normal_fan()
sage: inner_nf.rays()
N( 1, 0),
N( 0, -1),
N( 0, 1),
N(-1, 0),
N(-1, -1)
in 2-d lattice N
sage: outer_nf = P.normal_fan(direction='outer')
sage: outer_nf.rays()
N( 1, 0),
N( 1, 1),
N( 0, 1),
N(-1, 0),
N( 0, -1)
in 2-d lattice N
REFERENCES:
For more information, see Chapter 7 of [Zie2007]_.
Expand Down

0 comments on commit 308dada

Please sign in to comment.