diff --git a/tsp.py b/tsp.py index 1b96d1c..43cd7f1 100644 --- a/tsp.py +++ b/tsp.py @@ -2600,6 +2600,9 @@ start ='Bosch Bidadi' +''' +returns the minimum path cost for given weightmatrix and set of points in the path +''' def dpcost(currset, end, weightmatrix): currset = tuple(currset) if (currset,end) in dp.keys(): @@ -2619,6 +2622,9 @@ def dpcost(currset, end, weightmatrix): return dp[currset,end] +''' +Performs the memoization using dp dictionary to store values +''' def createdp(currset,start = start): for i in currset: if i != start: @@ -2659,6 +2665,9 @@ def findpath(weightmatrix, dp, currset, path = [], start= start): #### running TSP for all clusters #### +''' +Plots the results for given clusters +''' for clus in clusters: timewith = [] timewithout = []