jsgraphs
jsgraphs copied to clipboard
Optimize simulated annealing
Produce a production-ready version of simulated annealing with the following optimizations:
- Minimal delta cost computation: directly compute the delta using only the changed data
- Avoid cloning: instead of cloning current solution, create a rollback callback/instructions that will undo the changes, if the transition is rejected.
- Cost delta and rollback should be computed directly in the transition method