Skip to content

Commit

Permalink
Fixes bug where number of iterations is printed incorrectly (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt035343 authored Jul 7, 2022
1 parent a308872 commit 663890f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion anti_clustering/simulated_annealing_heuristic.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def _solve(self, distance_matrix: npt.NDArray[float], num_groups: int) -> npt.ND
objective = self._calculate_objective(cluster_assignment, distance_matrix)
for iteration in range(self.iterations):
if self.verbose and iteration % 5 == 0:
print(f'Iteration {iteration + 1} of {len(distance_matrix)}')
print(f'Iteration {iteration + 1} of {self.iterations}')

# Select random element
i = self.rnd.randint(0, len(distance_matrix) - 1)
Expand Down

0 comments on commit 663890f

Please sign in to comment.