Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
Choose a base branch
Nothing to show
...
Choose a Head Repository
Choose a head branch
Nothing to show
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Commits on Mar 12, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 sudoku_csp.py
View
@@ -63,9 +63,7 @@ def write_board_variables(variables):
human_board.append([])
for col in range(SQUARE_SIZE):
V = variables[row][col]
- domain = V.cur_domain()
- domain.sort()
- human_board[row].append(domain)
+ human_board[row].append(V.cur_domain())
return human_board
@@ -92,7 +90,7 @@ def enforce_gac(constraint_list):
# Push all constraints C' such that V is in scope of C' and C'
# is not in GACQueue
for C2 in constraint_list:
- if C2 not in GACQueue and V in C2.scope:
+ if V in C2.scope and C2 not in GACQueue:
GACQueue.append(C2)
return True

No commit comments for this range