Skip to content

Commit

Permalink
InteractiveLPBackend: Change default base_ring to QQ
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 13, 2016
1 parent d84b5bd commit c8fa4b0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/sage/numerical/backends/generic_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,7 @@ def default_mip_solver(solver = None):
- ``InteractiveLPProblem`` (``solver="InteractiveLP"``). A didactical
implementation of the revised simplex method in Sage. It works over
any exact ordered field, the default is ``AA``.
any exact ordered field, the default is ``QQ``.
``solver`` should then be equal to one of ``"GLPK"``,
``"Coin"``, ``"CPLEX"``, ``"CVXOPT"``, ``"Gurobi"``, ``"PPL"`, or
Expand Down Expand Up @@ -1294,7 +1294,7 @@ cpdef GenericBackend get_solver(constraint_generation = False, solver = None, ba
- ``InteractiveLPProblem`` (``solver="InteractiveLP"``). A didactical
implementation of the revised simplex method in Sage. It works over
any exact ordered field, the default is ``AA``.
any exact ordered field, the default is ``QQ``.
``solver`` should then be equal to one of ``"GLPK"``, ``"Coin"``,
``"CPLEX"``, ``"CVXOPT"``,``"Gurobi"``, ``"PPL"``, ``"InteractiveLP"``,
Expand Down
8 changes: 4 additions & 4 deletions src/sage/numerical/backends/interactivelp_backend.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ cdef class InteractiveLPBackend:
"""

if base_ring is None:
from sage.rings.all import AA
base_ring = AA
from sage.rings.all import QQ
base_ring = QQ

self.lp = InteractiveLPProblem([], [], [], base_ring=base_ring)
self.set_verbosity(0)
Expand All @@ -92,7 +92,7 @@ cdef class InteractiveLPBackend:
sage: from sage.numerical.backends.generic_backend import get_solver
sage: p = get_solver(solver = "InteractiveLP")
sage: p.base_ring()
Algebraic Real Field
Rational Field
"""
return self.lp.base_ring()

Expand Down Expand Up @@ -308,7 +308,7 @@ cdef class InteractiveLPBackend:
sage: from sage.numerical.backends.generic_backend import get_solver
sage: p = get_solver(solver = "InteractiveLP")
sage: p._AbcxCVPRd()
([], (), (), (), (), (), 'max', Algebraic Real Field, 0)
([], (), (), (), (), (), 'max', Rational Field, 0)
"""
A, b, c, x = self.lp.Abcx()
constraint_types = self.lp.constraint_types()
Expand Down
3 changes: 2 additions & 1 deletion src/sage/numerical/mip.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,8 @@ cdef class MixedIntegerLinearProgram(SageObject):
sage: p = MixedIntegerLinearProgram(solver='ppl')
sage: p.base_ring()
Rational Field
sage: p = MixedIntegerLinearProgram(solver='InteractiveLP')
sage: from sage.rings.all import AA
sage: p = MixedIntegerLinearProgram(solver='InteractiveLP', base_ring=AA)
sage: p.base_ring()
Algebraic Real Field
sage: d = polytopes.dodecahedron()
Expand Down

0 comments on commit c8fa4b0

Please sign in to comment.