Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
adc2019-system
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
adc2019
adc2019-system
Commits
d4e97b55
Commit
d4e97b55
authored
Aug 18, 2019
by
Kento HASEGAWA
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Support for multi-group problems at hsgw-solver
parent
62d5f661
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
hsgw
solvers/hsgw
+1
-1
__init__.py
utils/__init__.py
+1
-1
data.py
utils/data.py
+7
-3
No files found.
hsgw
@
f2e4e6c8
Subproject commit
5e5c48717d206c28cf08e7295c19b8a22346a7c5
Subproject commit
f2e4e6c80ba0d717151dbbe38e99f69691658e2f
utils/__init__.py
View file @
d4e97b55
from
.data
import
Problem
from
.data
import
Problem
,
Solution
utils/data.py
View file @
d4e97b55
...
...
@@ -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'
]
...
...
@@ -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
))
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment