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

Function _candidate_array

pyCombinatorial/algorithm/lkh.py:522–527  ·  view source on GitHub ↗
(candidates)

Source from the content-addressed store, hash-verified

520 return _make_candidate_sets_symmetric(augmented, candidate_size, distance_matrix = distance_matrix)
521
522def _candidate_array(candidates):
523 max_len = max(len(row) for row in candidates)
524 arr = -np.ones((len(candidates), max_len), dtype = np.int64)
525 for i, row in enumerate(candidates):
526 arr[i, :len(row)] = np.array(row, dtype = np.int64)
527 return arr
528
529############################################################################
530# INITIAL SOLUTIONS

Callers 1

local_search_lkh_strongFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected