Open hdbeukel opened 9 years ago
Update getBestMove
in NeighbourhoodSearch
accordingly. Optimize filtering. Remove parameter requireImprovement
. Where applicable, it can be checked whether the best move is actually an improvement after it has been obtained.
Currently, a neighbourhood has two methods:
getRandomMove
andgetAllMoves
. The latter yields an unneeded overhead if not all moves are actually inspected. For example, a first descent algorithm (see #19) scans the moves sequentially and accepts the first encountered valid improvement. Instead of constructing a list of all moves, it is thus better to return an iterator from which any subseries of all moves may be generated by the search.Update interface and all subset neighbourhoods.