|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.tsp.TSPBase | +--drasys.or.graph.tsp.ConstructBase
A base class containing features common to many construction TSP algorithms.
Constructor Summary | |
ConstructBase()
The target graph must be set with 'setGraph()'. |
|
ConstructBase(GraphI graph)
Sets the target graph. |
Method Summary | |
protected abstract void |
construct()
|
double |
constructClosedTour()
Construct a closed tour solution. |
double |
constructOpenTour()
Construct an open tour solution with arbitrary end points. |
double |
constructOpenTour(java.lang.Object originKey,
java.lang.Object destinationKey)
Construct a tour with explicit end points. |
double |
constructOpenTourFrom(java.lang.Object originKey)
Construct an open tour solution with an explicit origin and arbitrary destination. |
double |
constructOpenTourTo(java.lang.Object destinationKey)
Construct an open tour solution with an explicit destination and arbitrary origin. |
protected void |
saveTour()
|
void |
selectVertex(boolean select)
Selects all of the vertices in the graph to be in the tour if 'select' is true. |
void |
selectVertex(boolean[] select)
Selects all of the vertices whose corresponding element in 'select' is true. |
void |
selectVertex(java.lang.Object key,
boolean select)
Selects the vertex to be in the tour if 'select' is true. |
Methods inherited from class drasys.or.graph.tsp.TSPBase |
checkChangeCount,
countVertices,
forwardCost,
getCost,
getTour,
initVertices,
initVertices,
reverseCost,
rotateClosedTour,
setEdgeKey,
setGraph,
setProperties |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public ConstructBase()
public ConstructBase(GraphI graph)
Method Detail |
protected abstract void construct() throws TourNotFoundException
public double constructOpenTour(java.lang.Object originKey, java.lang.Object destinationKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTourFrom(java.lang.Object originKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTourTo(java.lang.Object destinationKey) throws TourNotFoundException, VertexNotFoundException
public double constructOpenTour() throws TourNotFoundException
public double constructClosedTour() throws TourNotFoundException
protected void saveTour()
public void selectVertex(boolean[] select)
public void selectVertex(boolean select)
public void selectVertex(java.lang.Object key, boolean select) throws VertexNotFoundException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |