class AutoRoutePanel.SimpleTSPSolver.Tour
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int[] |
from |
(package private) AutoRoutePanel.SimpleTSPSolver.Graph |
g |
(package private) double |
l |
(package private) int |
n |
int[] |
to |
Constructor and Description |
---|
Tour(AutoRoutePanel.SimpleTSPSolver.Graph g) |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
(package private) void |
getlength()
compute the length of the path
|
boolean |
improve()
try to find another path with shorter length using removals of points j and inserting i,j,i+1
|
boolean |
improvecross()
improve the path locally, using replacements of i,i+1 and j,j+1 with i,j and i+1,j+1
|
double |
length()
The length of this route.
|
(package private) void |
localoptimize()
find a local optimum starting from this path
|
void |
random(java.util.Random r)
Create a random route.
|
public Tour(AutoRoutePanel.SimpleTSPSolver.Graph g)
public java.lang.Object clone()
clone
in class java.lang.Object
public void random(java.util.Random r)
public double length()
public boolean improve()
true
if an improvement has been found, false
otherwise.public boolean improvecross()
true
if an improvement has been found, false
otherwise.void getlength()
void localoptimize()