Pārlūkot izejas kodu

Fixed TS crash when entire neighborhood is on tabu list

Jan Potocki 5 gadus atpakaļ
vecāks
revīzija
c10d296d82
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3
    1
      Graph.cpp

+ 3
- 1
Graph.cpp Parādīt failu

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);

Notiek ielāde…
Atcelt
Saglabāt