## constructor TSP(x, labels = NULL) ## coercion as.TSP(x) ## methods "n_of_cities"(x) "image"(x, order, col = gray.colors(64), ...) "labels"(object, ...) "print"(x, ...)
dist
TSP
x
TOUR
TSP()
n_of_cities()
labels()
as.dist()
insert_dummy
tour_length
solve_TSP
data("iris") d <- dist(iris[-5]) ## create a TSP tsp <- TSP(d) tsp ## use some methods n_of_cities(tsp) labels(tsp) image(tsp)
Run the code above in your browser using DataCamp Workspace