Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/30/12 13:32:18 (12 years ago)
Author:
spimming
Message:

#1894: error correction on AStar algorithm

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RoutePlanning/HeuristicLab.Algorithms.GraphRouting/3.3/AStarAlgorithm.cs

    r8350 r8356  
    99    private Dictionary<long, float> distances;
    1010    private Dictionary<long, long> predecessors;
    11     private List<float> closedList = new List<float>();
     11    private List<long> closedList;
    1212    //private PriorityQueueOld<float, long> openList;
    1313    private PriorityQueue<float, long> openList;
     
    2222      distances = new Dictionary<long, float>();
    2323      predecessors = new Dictionary<long, long>();
    24       closedList = new List<float>();
     24      closedList = new List<long>();
    2525      //openList = new PriorityQueueOld<float, long>();
    2626      openList = new PriorityQueue<float, long>(new MyComparer());
     
    5959          openList.Enqueue(f, neighbor.Key);
    6060        }
     61        closedList.Add(currentNode);
    6162      }
    6263      throw new Exception(string.Format("No route found from {0} to {1}", sourceNodeId, targetNodeId));
Note: See TracChangeset for help on using the changeset viewer.