public IPathNode Pop() { IPathNode result = null; foreach (IPathNode p in _nodes.Values) { if (result == null || p.CompareTo(result) == 1) { result = p; //p has a shorter distance than result } } if (result == null) { return(null); } else { _nodes.Remove(result.GetUniqueID()); return(result); } }
public void Push(IPathNode pNode) { _nodes[pNode.GetUniqueID()] = pNode; }