Skip to content

Commit

Permalink
optimize astar algorithm with an extra array for fast testing openset
Browse files Browse the repository at this point in the history
  • Loading branch information
xtaci committed May 17, 2014
1 parent 1b92df7 commit 7d9106e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/astar.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ namespace alg {
uint32_t ncol = m_grid.col();

// test wheather the (x1, y1) is the wall, we don't do stupid searching.
//if (m_grid(x1, y1) == WALL) {
// return NULL;
//}
if (m_grid(x1, y1) == WALL) {
return NULL;
}

// the set of tentavie nodes to be evaluated,
// initialy containing the start node
Expand Down

0 comments on commit 7d9106e

Please sign in to comment.