|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.tsp.ConstructToImproveConverter
This class allows a construction algorithm to be used as an improvement algorithm.
Constructor Summary | |
ConstructToImproveConverter(ConstructI construct)
|
|
ConstructToImproveConverter(ConstructI construct,
GraphI graph)
|
Method Summary | |
ConstructI |
getConstructAlgorithm()
|
double |
getCost()
Returns the cost of the solution tour. |
java.util.Vector |
getTour()
Returns the solution tour. |
double |
improveClosedTour(java.util.Vector tour)
Improve a closed tour solution. |
double |
improveOpenTour(java.util.Vector tour)
Improve an open tour solution with arbitrary end points. |
double |
improveOpenTour(java.util.Vector tour,
boolean fixedOrigin,
boolean fixedDestination)
Improve an open tour solution with fixed end points. |
java.util.Vector |
rotateClosedTour(java.util.Vector tour,
java.lang.Object key)
Rotates the closed tour until the vertex that matches key is the vertex that is repeated on both ends. |
void |
setEdgeKey(java.lang.Object edgeKey)
Sets the edge key for the construction algorithm. |
void |
setGraph(GraphI graph)
Sets the graph for the construction algorithm. |
void |
setProperties(PropertiesI properties)
Sets the edge properties object for the construction algorithm. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ConstructToImproveConverter(ConstructI construct)
public ConstructToImproveConverter(ConstructI construct, GraphI graph)
Method Detail |
public ConstructI getConstructAlgorithm()
public void setGraph(GraphI graph)
public void setProperties(PropertiesI properties)
public void setEdgeKey(java.lang.Object edgeKey)
public double getCost()
public java.util.Vector getTour()
public java.util.Vector rotateClosedTour(java.util.Vector tour, java.lang.Object key) throws VertexNotFoundException
public double improveOpenTour(java.util.Vector tour) throws TourNotFoundException
public double improveOpenTour(java.util.Vector tour, boolean fixedOrigin, boolean fixedDestination) throws TourNotFoundException
public double improveClosedTour(java.util.Vector tour) throws TourNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |