-
Notifications
You must be signed in to change notification settings - Fork 21
Open
ben-hudson/tsplib95
#1Description
- TSPLIB 95 version: 0.7.1
- Python version: 3.8
- Operating System: Mac OS X
Description
Attempted to parse an edge list by setting EDGE_DATA_FORMAT='EDGE_LIST', but tsplib95 always returns an adjacency instead of an edge list.
What I Did
Added an assert statement to line 23 of test_edge_data_field.py. The test now fails because an edge list is expected for the case on line 13, but an adjacency is returned.
Further when parsing an edge list, each edge is expected to be a tuple, but there is no TupleT transformer for tuples. A list of lists is returned, but a list of tuples is expected.
Proposed fix
- Create a new
TupleT - In EdgeDataField, switch the order of edge list and adjacency list. I.e. try to parse edge list first, then if fails, try and parse an adjacency.
- Add assert statements to tests.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels