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

Commit

Permalink
MixedIntegerLinearProgram.ambient_manifold: Add docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed Apr 28, 2021
1 parent 616dc06 commit 1c7a697
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/sage/numerical/mip.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -2786,9 +2786,24 @@ cdef class MixedIntegerLinearProgram(SageObject):
raise ValueError('Form of interactive_lp_problem must be either None or \'standard\'')

def ambient_manifold(self):
r"""
Return the Euclidean space that is the ambient space of the problem.
EXAMPLES::
sage: LP.<x> = MixedIntegerLinearProgram()
sage: y = LP.new_variable(name='y')
sage: x[1], x[5], y["why"]
(x_0, x_1, x_2)
sage: M = LP.ambient_manifold()
sage: M.default_chart()
Chart (E^3, (x_1, x_5, y_why))
"""
from sage.manifolds.differentiable.examples.euclidean import EuclideanSpace
return EuclideanSpace(names=self._backend_variable_names())


class MIPSolverException(RuntimeError):
r"""
Exception raised when the solver fails.
Expand Down

0 comments on commit 1c7a697

Please sign in to comment.