|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--drasys.or.graph.tsp.TSPBase
A base class containing features common to many TSP algorithms.
Method Summary | |
protected void |
checkChangeCount()
|
protected int |
countVertices()
|
double |
forwardCost(int r,
int c)
Retuns the forward cost between two vertices. |
double |
getCost()
Returns the cost of the solution tour. |
java.util.Vector |
getTour()
Returns the improved tour from the construction algorithm. |
protected void |
initVertices(int from,
int to)
|
protected void |
initVertices(java.util.Vector tour)
|
double |
reverseCost(int c,
int r)
Retuns the reverse cost between two vertices. |
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 key used to select from parallel edges between vertices. |
void |
setGraph(GraphI graph)
Sets the graph. |
void |
setProperties(PropertiesI properties)
Sets the edge properties object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Method Detail |
protected void checkChangeCount()
public void setProperties(PropertiesI properties)
public java.util.Vector rotateClosedTour(java.util.Vector tour, java.lang.Object key) throws VertexNotFoundException
public void setEdgeKey(java.lang.Object edgeKey)
public void setGraph(GraphI graph)
protected void initVertices(int from, int to)
protected int countVertices()
protected void initVertices(java.util.Vector tour)
public double getCost()
public java.util.Vector getTour()
public final double forwardCost(int r, int c)
public final double reverseCost(int c, int r)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |