Research Article
Escaping Depressions in LRTS Based on Incremental Refinement of Encoded Quad-Trees
Algorithm 2
Pseudocode of the algorithm to recursively build the quad-trees: BuildQuadtree(obstList, indexX, indexY, size).
| (1) if isObstExist(obstList, index , index , size) true then | | (2) Set the node state , and insert it into the hash table; | | (3) else | | (4) if isAllOccupied(obstList, index , index , size) true then | | (5) Set the node state , and insert it into the hash table; | | (6) else | | (7) Set the node state , and insert it into the hash table; | | (8) Generate four children, and assign newIndex , newIndex , ; | | (9) for = 1 : 4 do | | (10) BuildQuadtree(obstList, newIndexX[], newIndexY[], size) | | (11) end | | (12) end | | (13) end |
|