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

Commit

Permalink
Add testcase for plotting of irrational polygons
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 8, 2016
1 parent 0416add commit aa3fa4b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/sage/numerical/interactive_simplex_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -1521,6 +1521,17 @@ def plot(self, *args, **kwds):
sage: InteractiveLPProblem(A, b, (0, 0), ["C", "B"], variable_type=">=").plot()
Graphics object consisting of 8 graphics primitives
We check that irrational polygons can be plotted::
sage: poly = polytopes.regular_polygon(7)
sage: lp, x = poly.to_linear_program(solver='InteractiveLP', return_variable=True)
sage: lp.set_objective(x[0] + x[1])
sage: b = lp.get_backend()
sage: P = b.interactive_lp_problem()
sage: p = P.plot()
sage: p.show()
"""
FP = self.plot_feasible_set(*args, **kwds)
c = self.c().n().change_ring(QQ)
Expand Down

0 comments on commit aa3fa4b

Please sign in to comment.