Преглед изворни кода

Fixed TS crash when entire neighborhood is on tabu list

Jan Potocki пре 6 година
родитељ
комит
c10d296d82
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3
    1
      Graph.cpp

+ 3
- 1
Graph.cpp Прегледај датотеку

517
 
517
 
518
         while(cheeseSupplied == true)
518
         while(cheeseSupplied == true)
519
         {
519
         {
520
-            std::vector<unsigned> nextRoute;
520
+            std::vector<unsigned> nextRoute = currentRoute;
521
+            // ...na wszelki wypadek, gdyby cale sasiedztwo bylo na liscie tabu
522
+            // (zeby algorytm sie nie wywalil)
521
             int nextRouteLength = -1;
523
             int nextRouteLength = -1;
522
 
524
 
523
             std::vector<unsigned> nextTabu(3, 0);
525
             std::vector<unsigned> nextTabu(3, 0);

Loading…
Откажи
Сачувај