30 using namespace YACS::HMI;
33 LCostNode::LCostNode() : _gCost(0), _hCost(0), _fCost(0),
34 _parent( std::pair<int,int>(0,0) )
51 _pq=std::priority_queue<Cost>();
62 _pq=std::priority_queue<Cost>();
70 pair<int, int> curPos = _from.
getPos();
76 while (! ((curPos.first ==
_to.
getX()) && (curPos.second ==
_to.
getY()))
81 DEBTRACE(
"curPos(" << curPos.first <<
"," << curPos.second <<
")");
95 aPath.push_front(
_to);
101 aPath.push_front(current);
111 LNodeMap::const_iterator it = aList.find(n);
112 if (it == aList.end())
121 int x = currentNode.first;
122 int y = currentNode.second;
123 for (
int i = x-1;
i <= x+1;
i++)
127 for (
int j = y-1; j <= y+1; j++)
132 if ((
i == x) && (j == y))
135 if ((
i != x) && (j != y))
142 pair<int,int> pos(
i,j);
168 std::pair<int, int> pos;
174 while(aList.count(pos)==0);
182 DEBTRACE(
"node not in open list, can't delete");