Tsp.parse_tsplib_format¶
- static Tsp.parse_tsplib_format(filename)[ソース]¶
Read a graph in TSPLIB format from file and return a Tsp instance.
- パラメータ:
filename (str) – the name of the file.
- 例外:
QiskitOptimizationError – If the type is not 「TSP」
QiskitOptimizationError – If the edge weight type is not 「EUC_2D」
- 戻り値:
A Tsp instance data.
- 戻り値の型: