index_to_swap = np.random.randint(k)
outsider_to_swap = np.random.randint(N - k)
tmp = current_subset[index_to_swap]
proposed_subset[index_to_swap] = current_outsiders[outsider_to_swap]
proposed_outsiders[outsider_to_swap] = tmp
potential_change = np.exp(-1.0 / temp * calculate_distance(proposed_subset,
    all_dists) / calculate_distance(current_subset, all_dists))
if potential_change > 1 or potential_change >= np.random.rand():
    current_subset = proposed_subset
current_outsiders = proposed_outsiders
temp = cooling_rate * temp
Chose the farthest k points from given n points