Skip to content

Commit

Permalink
[nodist_examples] remove dump_dict from matroid example
Browse files Browse the repository at this point in the history
  • Loading branch information
spj101 authored and Stephan Jahn committed Jan 9, 2018
1 parent 1e12153 commit 0e0d394
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions nodist_examples/matroid/matroid.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,23 +242,6 @@ def get_shortest_candidates(candidates, indices):

return representation

def dump_dict(dictionary, file):
'''
Write a dictionary to a file, sorting by keys.
:param representation:
dict;
The dictionary to write to a file.
:param file:
str;
The name of the file to write to.
'''
with open(file, 'w') as f:
for key in sorted(dictionary.keys()):
f.write(str(key) + ': ' + str(dictionary[key]) + '\n')

if __name__ == '__main__':

# Matroid 1a
Expand Down Expand Up @@ -336,21 +319,6 @@ def dump_dict(dictionary, file):
call5a = canonicalize(internal_lines5a, external_lines5a, onshell_conditions5a, masses5a)
call5b = canonicalize(internal_lines5b, external_lines5b, onshell_conditions5b, masses5b)

dump_dict(call1a,'call1a.txt')
dump_dict(call1b,'call1b.txt')

dump_dict(call2a,'call2a.txt')
dump_dict(call2b,'call2b.txt')

dump_dict(call3a,'call3a.txt')
dump_dict(call3b,'call3b.txt')

dump_dict(call4a,'call4a.txt')
dump_dict(call4b,'call4b.txt')

dump_dict(call5a,'call5a.txt')
dump_dict(call5b,'call5b.txt')

print(call1a == call1b)
print(call2a == call2b)
print(call3a == call3b)
Expand Down

0 comments on commit 0e0d394

Please sign in to comment.