diff --git a/exhaustive_search.py b/exhaustive_search.py index 3584979..7c93d52 100644 --- a/exhaustive_search.py +++ b/exhaustive_search.py @@ -20,8 +20,8 @@ def exhaustive_search(distances: npt.NDArray) -> Tuple[float, npt.NDArray]: distances (npt.NDArray): An array containing distances to travel. Returns: - A tuple containing the shortest travel distance and its corresponding - permutation. + Tuple[float, npt.NDArray] A tuple containing the shortest travel + distance and its corresponding permutation. """ size = len(distances) @@ -30,7 +30,7 @@ def exhaustive_search(distances: npt.NDArray) -> Tuple[float, npt.NDArray]: map( # Map the permutation array to contain tuples (distance, permutation) lambda perm: ( sum([distances[perm[i - 1], perm[i]] for i in range(size)]), - np.array(perm) + np.array(perm), ), permutations(range(size)), ),