Table of Contents ▸ List of Commands ▸ Features Extraction ▸ tsp | ◀ topographic_map | variance_patch ▶ |
tsp
Arguments:
- _precision>=0
Description:
Try to solve the travelling salesman problem, using a combination of greedy search and 2-opt algorithms.Selected images must have dimensions Nx1x1xC to represent N cities each with C-dimensional coordinates.
This command re-order the selected data along the x-axis so that the point sequence becomes a shortest path.
Default values:
precision=256.
Example of use:
256,1,1,2 rand 0,512 tsp , 512,512,1,3 repeat w#0 circle[-1] {0,I[$>]},2,1,255,255,255 line[-1] {0,boundary=2;[I[$>],I[$>+1]]},1,255,128,0 done keep[-1]
