Uses of Class
edu.cnu.mdi.sim.simanneal.tspdemo.TspSolution
Packages that use TspSolution
-
Uses of TspSolution in edu.cnu.mdi.sim.simanneal.tspdemo
Methods in edu.cnu.mdi.sim.simanneal.tspdemo that return TspSolutionModifier and TypeMethodDescriptionTspSolution.copy()Return an independent deep copy of this solution.TspAnnealingProblem.randomSolution(Random rng) Generate a uniformly random tour by shuffling all city indices.Methods in edu.cnu.mdi.sim.simanneal.tspdemo that return types with arguments of type TspSolutionModifier and TypeMethodDescriptionTspAnnealingProblem.randomMove(Random rng, TspSolution current) Return a preparedTspMovefor the next annealing step.Methods in edu.cnu.mdi.sim.simanneal.tspdemo with parameters of type TspSolutionModifier and TypeMethodDescriptionvoidTspMove.apply(TspSolution sol) Apply the prepared 2-opt reversal in-place.doubleTspMove.deltaE(TspSolution sol) Compute the exact ΔE for the prepared 2-opt reversal.doubleTspAnnealingProblem.energy(TspSolution sol) Compute the energy (cost) of a solution as its total tour length.voidTspMove.prepare(TspSolution sol) Choose a non-degenerate 2-opt segment for the next move.TspAnnealingProblem.randomMove(Random rng, TspSolution current) Return a preparedTspMovefor the next annealing step.voidTspMove.undo(TspSolution sol) Undo by reversing the same segment again.