diff --git a/exhaustive_search.py b/exhaustive_search.py index 43cb2e1..ec2042c 100644 --- a/exhaustive_search.py +++ b/exhaustive_search.py @@ -1,6 +1,6 @@ import time from itertools import permutations -from typing import Callable, Tuple +from typing import Tuple import numpy.typing as npt @@ -25,8 +25,8 @@ def exhaustive_search(distances: npt.NDArray) -> Tuple[float, Tuple]: size = len(distances) - return min( # Find the smallest travel distance from the array - map( # Map the permutation array to contain tuples (distance, permutation) + return min( # Find the smallest travel distance from the array + map( # Map the permutation array to contain tuples (distance, permutation) lambda perm: ( sum([distances[perm[i - 1], perm[i]] for i in range(size)]), perm, @@ -53,7 +53,7 @@ if __name__ == "__main__": print(f"time to find solution: {time_elapsed_ms:>12.6f}ms\n") -""" Running example +"""Running example oblig1 on  main [?] via 🐍 v3.12.6 took 7s ❯ python exhaustive_search.py