Class CAPBaseMove
java.lang.Object
es.urjc.etsii.grafo.solution.Move<CAPSolution,CAPInstance>
es.urjc.etsii.grafo.flayouts.model.CAPBaseMove
Base class for all movements for the CAP problem. All movements should extend this class.
-
Field Summary
Fields inherited from class es.urjc.etsii.grafo.solution.Move
solutionVersion -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract CAPSolution_execute(CAPSolution solution) Executes the proposed move, to be implemented by each move type.abstract booleanabstract doublegetValue()Get the movement value, represents how much does the move changes the f.o of a solution if executedabstract inthashCode()abstract StringtoString()Returns a String representation of the current movement.
-
Constructor Details
-
CAPBaseMove
Move constructor- Parameters:
solution- solution
-
-
Method Details
-
_execute
Executes the proposed move, to be implemented by each move type.- Specified by:
_executein classMove<CAPSolution,CAPInstance> - Parameters:
solution- Solution where this move will be applied to.- Returns:
- true if the solution has changed, false if for any reason the movement is not applied or the solution does not change after executing the move
-
getValue
public abstract double getValue()Get the movement value, represents how much does the move changes the f.o of a solution if executed- Returns:
- f.o change
-
toString
Returns a String representation of the current movement. Only use relevant fields. Tip: Default IntelliJ implementation is fine- Specified by:
toStringin classMove<CAPSolution,CAPInstance> - Returns:
- human readable string
-
equals
- Specified by:
equalsin classMove<CAPSolution,CAPInstance>
-
hashCode
public abstract int hashCode()- Specified by:
hashCodein classMove<CAPSolution,CAPInstance>
-