fast_tsp.compute_cost

fast_tsp.compute_cost(tour, dists)

Returns the cost of a tour.

Computes the cost of a tour on a distance matrix. No validation on whether the tour is valid is performed.

Parameters:
Return type:

float

Returns:

The cost of the tour.