MCPcopy Create free account
hub / github.com/Valdecy/pyCombinatorial / seed_function

Function seed_function

pyCombinatorial/algorithm/s_sct.py:30–36  ·  view source on GitHub ↗
(distance_matrix)

Source from the content-addressed store, hash-verified

28
29# Function: Initial Seed
30def seed_function(distance_matrix):
31 seed = [[],float('inf')]
32 sequence = random.sample(list(range(1, distance_matrix.shape[0]+1)), distance_matrix.shape[0])
33 sequence.append(sequence[0])
34 seed[0] = sequence
35 seed[1] = distance_calc(distance_matrix, seed)
36 return seed
37
38############################################################################
39

Callers 1

scatter_searchFunction · 0.70

Calls 1

distance_calcFunction · 0.70

Tested by

no test coverage detected