Class InsertNeighborhood.InsertMove
java.lang.Object
es.urjc.etsii.grafo.solution.Move<TSPSolution,TSPInstance>
es.urjc.etsii.grafo.TSP.model.TSPBaseMove
es.urjc.etsii.grafo.TSP.model.neighs.InsertNeighborhood.InsertMove
- Enclosing class:
InsertNeighborhood
-
Field Summary
Fields inherited from class es.urjc.etsii.grafo.TSP.model.TSPBaseMove
distanceDelta
Fields inherited from class es.urjc.etsii.grafo.solution.Move
solutionVersion
-
Constructor Summary
ConstructorsConstructorDescriptionInsertMove
(TSPSolution solution, int pi, int pj) Constructor on an insert move. -
Method Summary
Modifier and TypeMethodDescriptionprotected TSPSolution
_execute
(TSPSolution solution) Executes the proposed move, to be implemented by each move typeboolean
int
hashCode()
toString()
Returns a String representation of the current movement.Methods inherited from class es.urjc.etsii.grafo.TSP.model.TSPBaseMove
getDistanceDelta
-
Constructor Details
-
InsertMove
Constructor on an insert move. Given a solution, an insert move consist in inserting the the location of a position pi, into a position pj.- Parameters:
solution
- current solutionpi
- position of the location is going to be inserted into pjpj
- position where the location of pi is going to be inserted
-
-
Method Details
-
_execute
Description copied from class:Move
Executes the proposed move, to be implemented by each move type- Specified by:
_execute
in classMove<TSPSolution,
TSPInstance>
-
toString
Description copied from class:Move
Returns a String representation of the current movement. Tip: Default IDEs implementations are usually fine- Specified by:
toString
in classMove<TSPSolution,
TSPInstance> - Returns:
- human readable string
-
equals
Description copied from class:Move
- Specified by:
equals
in classMove<TSPSolution,
TSPInstance>
-
hashCode
public int hashCode()Description copied from class:Move
- Specified by:
hashCode
in classMove<TSPSolution,
TSPInstance>
-