update python code, remove __future__ imports, remove six, use absl-py for flags, update examples

This commit is contained in:
Laurent Perron
2020-11-18 10:50:14 +01:00
parent c1b23ffd92
commit 4ececbe448
99 changed files with 246 additions and 340 deletions

View File

@@ -16,14 +16,13 @@
http://www.ee.oulu.fi/~mpa/matreng/eem1_2-1.htm with kCost[0][1]
modified so the optimum solution is unique.
"""
from __future__ import print_function
from absl import app
from ortools.graph import pywrapgraph
def RunAssignmentOn4x4Matrix():
"""Test linear sum assignment on a 4x4 matrix.
"""
"""Test linear sum assignment on a 4x4 matrix."""
num_sources = 4
num_targets = 4
cost = [[90, 76, 75, 80], [35, 85, 55, 65], [125, 95, 90, 105],
@@ -49,9 +48,9 @@ def RunAssignmentOn4x4Matrix():
'Some input costs are too large and may cause an integer overflow.')
def main():
def main(_):
RunAssignmentOn4x4Matrix()
if __name__ == '__main__':
main()
app.run(main)