tsp_instance {tspmeta}R Documentation

Generates a TSP instance S3 object either from city coordinates.

Description

Generates a TSP instance S3 object either from city coordinates.

Usage

tsp_instance(coords, dists)

Arguments

coords

[matrix]
Numeric matrix of city coordinates, rows denote cities.

dists

[dist]
Optional distance matrix containing the inter-city distances. If not provided, the (euclidean) distances are computed from the coordinates.

Value

[tsp_instance].


[Package tspmeta version 1.2 Index]