write_TSPLIB(x, file, precision = 6, inf = NULL)
read_TSPLIB(file, precision = 0)
TSP
.connection
.x
is used as
is if x
already is integer
.Inf
(TSPLIB format cannot handle
Inf
). If inf
is NULL
, the default value of 2 times
the maximum value in x
(ignoring the infinity entries) is used.read_TSPLIB
returns an object of class TSP
.x
contains double
values (which is normal in R) the values given
in x
are multiplied by $10^{precision}$ before coercion to
integer
. Note that therefore all results produced by programs using the
TSPLIB file as input need to be divided by $10^{precision}$ (i.e., the
decimal point has to be shifted precision
placed to the left).