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
distanceDeltaFields 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 typebooleaninthashCode()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:MoveExecutes the proposed move, to be implemented by each move type- Specified by:
_executein classMove<TSPSolution,TSPInstance>
-
toString
Description copied from class:MoveReturns a String representation of the current movement. Tip: Default IDEs implementations are usually fine- Specified by:
toStringin classMove<TSPSolution,TSPInstance> - Returns:
- human readable string
-
equals
Description copied from class:Move- Specified by:
equalsin classMove<TSPSolution,TSPInstance>
-
hashCode
public int hashCode()Description copied from class:Move- Specified by:
hashCodein classMove<TSPSolution,TSPInstance>
-