Skip to content

Commit f51ace7

Browse files
bug in hillclimbing
1 parent 41a1fd5 commit f51ace7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

include/osp/bsp/scheduler/LocalSearch/HillClimbing/hill_climbing.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ void HillClimbingScheduler<GraphT>::AddMoveOption(const VertexIdx node, const un
579579
template <typename GraphT>
580580
void HillClimbingScheduler<GraphT>::EraseMoveOption(VertexIdx node, unsigned proc, Direction dir) {
581581
canMove_[dir][node][proc] = false;
582-
if (nextMove_.first == dir && nextMove_.second->first == node && nextMove_.second->second == proc) {
582+
if (nextMove_.first == dir && nextMove_.second != moveOptions_[dir].end() && nextMove_.second->first == node && nextMove_.second->second == proc) {
583583
++nextMove_.second;
584584
}
585585
moveOptions_[dir].erase(movePointer_[dir][node][proc]);

0 commit comments

Comments
 (0)