Skip to content

Commit

Permalink
added tests for copy method and verified correct functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
ComboProblem authored and Matthias Köppe committed May 8, 2024
1 parent 3283fac commit e62c87e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/sage/numerical/interactive_simplex_method.py
Original file line number Diff line number Diff line change
Expand Up @@ -3913,6 +3913,22 @@ def __init__(self, A, b, c, objective_value,
self._AbcvBNz = [A, b, c, objective_value, B, N, SR(objective_name)]

def __copy__(self):
r"""
TESTS::
sage: A = ([1, 1], [3, 1])
sage: b = (1000, 1500)
sage: c = (10, 5)
sage: P = InteractiveLPProblemStandardForm(A, b, c)
sage: D = P.initial_dictionary()
sage: D_2 = copy(D)
sage: D is D_2
False
sage: D.enter('x1')
sage: D.leave('x3')
sage: D.update()
sage: D_2 == D
False
"""
return type(self)(*self._AbcvBNz)

@staticmethod
Expand Down

0 comments on commit e62c87e

Please sign in to comment.