Skip to content

Commit 0ac343a

Browse files
committed
remove a spurrous adding of the same constraint twice
1 parent f48da11 commit 0ac343a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/sage/coding/delsarte_bounds.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,9 +201,8 @@ def _delsarte_LP_building(n, d, d_star, q, isinteger, solver, maxc=0):
201201
constraint_1: 0 <= x_1 <= 0
202202
constraint_2: 0 <= x_2 <= 0
203203
constraint_3: -7 x_0 - 5 x_1 - 3 x_2 - x_3 + x_4 + 3 x_5 + 5 x_6 + 7 x_7 <= 0
204-
constraint_4: -7 x_0 - 5 x_1 - 3 x_2 - x_3 + x_4 + 3 x_5 + 5 x_6 + 7 x_7 <= 0
205204
...
206-
constraint_16: - x_0 + x_1 - x_2 + x_3 - x_4 + x_5 - x_6 + x_7 <= 0
205+
constraint_9: - x_0 + x_1 - x_2 + x_3 - x_4 + x_5 - x_6 + x_7 <= 0
207206
Variables:
208207
x_0 is a continuous variable (min=0, max=+oo)
209208
...
@@ -220,7 +219,6 @@ def _delsarte_LP_building(n, d, d_star, q, isinteger, solver, maxc=0):
220219
for j in range(1, n + 1):
221220
rhs = sum([krawtchouk(n, q, j, r, check=False) * A[r]
222221
for r in range(n + 1)])
223-
p.add_constraint(0 <= rhs)
224222
if j >= d_star:
225223
p.add_constraint(0 <= rhs)
226224
else: # rhs is proportional to j-th weight of the dual code

0 commit comments

Comments
 (0)