Loading hsgw @ f2e4e6c8 Compare 5e5c4871 to f2e4e6c8 Changes for solvers/hsgw: 1 added line, 1 removed line. Original line number Diff line number Diff line Subproject commit 5e5c48717d206c28cf08e7295c19b8a22346a7c5 Subproject commit f2e4e6c80ba0d717151dbbe38e99f69691658e2f utils/__init__.py +1 −1 Changes for utils/__init__.py: 1 added line, 1 removed line. Original line number Diff line number Diff line from .data import Problem from .data import Problem, Solution utils/data.py +6 −2 Changes for utils/data.py: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -80,8 +80,12 @@ class Problem(object): problem_text = '' num_tiles = 0 line_remap_list = list() line_remap_list.append(0) block_remap_list = list() block_remap_list.append(0) block_text = '' for bi, bn in enumerate(g): block_remap_list.append(bn) b = self.blocks[bn] num_tiles += b['num_tiles'] Loading @@ -93,7 +97,7 @@ class Problem(object): if isinstance(bc, int) and bc > 0: if not bc in line_remap_list: line_remap_list.append(bc) remapped_index = line_remap_list.index(bc) + 1 remapped_index = line_remap_list.index(bc) br_cells.append(str(remapped_index)) else: br_cells.append(str(bc)) Loading @@ -106,7 +110,7 @@ class Problem(object): problem_text += '\n' problem_text += block_text group_problems.append(problem_text) group_problems.append((problem_text, line_remap_list, block_remap_list)) return group_problems Loading Loading
hsgw @ f2e4e6c8 Compare 5e5c4871 to f2e4e6c8 Changes for solvers/hsgw: 1 added line, 1 removed line. Original line number Diff line number Diff line Subproject commit 5e5c48717d206c28cf08e7295c19b8a22346a7c5 Subproject commit f2e4e6c80ba0d717151dbbe38e99f69691658e2f
utils/__init__.py +1 −1 Changes for utils/__init__.py: 1 added line, 1 removed line. Original line number Diff line number Diff line from .data import Problem from .data import Problem, Solution
utils/data.py +6 −2 Changes for utils/data.py: 6 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -80,8 +80,12 @@ class Problem(object): problem_text = '' num_tiles = 0 line_remap_list = list() line_remap_list.append(0) block_remap_list = list() block_remap_list.append(0) block_text = '' for bi, bn in enumerate(g): block_remap_list.append(bn) b = self.blocks[bn] num_tiles += b['num_tiles'] Loading @@ -93,7 +97,7 @@ class Problem(object): if isinstance(bc, int) and bc > 0: if not bc in line_remap_list: line_remap_list.append(bc) remapped_index = line_remap_list.index(bc) + 1 remapped_index = line_remap_list.index(bc) br_cells.append(str(remapped_index)) else: br_cells.append(str(bc)) Loading @@ -106,7 +110,7 @@ class Problem(object): problem_text += '\n' problem_text += block_text group_problems.append(problem_text) group_problems.append((problem_text, line_remap_list, block_remap_list)) return group_problems Loading