Class __RNAME__Solution
java.lang.Object
es.urjc.etsii.grafo.solution.Solution<__RNAME__Solution,__RNAME__Instance>
es.urjc.etsii.grafo.__RNAME__.model.__RNAME__Solution
-
Field Summary
Fields inherited from class es.urjc.etsii.grafo.solution.Solution
lastModifiedTime, lastMoves
-
Constructor Summary
ConstructorsConstructorDescription__RNAME__Solution
(__RNAME__Instance instance) Initialize solution from instance__RNAME__Solution
(__RNAME__Solution solution) Clone constructor -
Method Summary
Methods inherited from class es.urjc.etsii.grafo.solution.Solution
customProperties, getInstance, getLastModifiedTime, getVersion, lastExecutesMoves, lastExecutesMovesAsString, notifyUpdate, notifyUpdate
-
Constructor Details
-
__RNAME__Solution
Initialize solution from instance- Parameters:
instance
-
-
__RNAME__Solution
Clone constructor- Parameters:
solution
- Solution to clone
-
-
Method Details
-
cloneSolution
Description copied from class:Solution
Clone the current solution. Deep clone mutable data or you will regret it.- Specified by:
cloneSolution
in classSolution<__RNAME__Solution,
__RNAME__Instance> - Returns:
- A deep clone of the current solution
-
getScore
public double getScore()Get the current solution score. The difference between this method and recalculateScore is that this result can be a property of the solution, or cached, it does not have to be calculated each time this method is called- Returns:
- current solution score as double
-
toString
Generate a string representation of this solution. Used when printing progress to console, show as minimal info as possible- Specified by:
toString
in classSolution<__RNAME__Solution,
__RNAME__Instance> - Returns:
- Small string representing the current solution (Example: id + score)
-