
//now to test all the edges attached to this node
graph_type::ConstEdgeIterator ConstEdgeItr(m_Graph, NextClosestNode);
for (const Edge* pE=ConstEdgeItr.begin();
!ConstEdgeItr.end();
pE=ConstEdgeItr.next())
{
//calculate the heuristic cost from this node to the target (H)
double HCost = heuristic::Calculate(m_Graph, m_iTarget, pE->To());
//calculate the "real" cost to this node from the source (G)
double GCost = m_GCosts[NextClosestNode] + pE->Cost();
//if the node has not been added to the frontier, add it and update
//the G and F costs
if (m_SearchFrontier[pE->To()] == NULL)
{
m_FCosts[pE->T()] = GCost + HCost;
m_GCosts[pE->To()] = GCost;
pq.insert(pE->To()); ...