|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectat.tuwien.ifs.somtoolbox.apps.viewer.controls.AutoRoutePanel.SimpleTSPSolver.Tour
class AutoRoutePanel.SimpleTSPSolver.Tour
A path in a graph. From[i] is the index of the point leading to i. To[i] the index of the point after i. The path can optimize itself in a graph.
Field Summary | |
---|---|
int[] |
from
|
(package private) AutoRoutePanel.SimpleTSPSolver.Graph |
g
|
(package private) double |
l
|
(package private) int |
n
|
int[] |
to
|
Constructor Summary | |
---|---|
AutoRoutePanel.SimpleTSPSolver.Tour(AutoRoutePanel.SimpleTSPSolver.Graph g)
|
Method Summary | |
---|---|
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(Random r)
Create a random route. |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
AutoRoutePanel.SimpleTSPSolver.Graph g
int n
double l
public int[] from
public int[] to
Constructor Detail |
---|
public AutoRoutePanel.SimpleTSPSolver.Tour(AutoRoutePanel.SimpleTSPSolver.Graph g)
Method Detail |
---|
public Object clone()
clone
in class Object
public void random(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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |