|
PBeFS
Parallel Best-First Search
|
the moves from a cell of a GridMap and their costs, on the GridGraph of ADS More...
#include <PBeFS/astar/structures/ads/GridAdjacency.h>
Public Types | |
| using | cost_type = std::conditional_t< Moves == 4 , int , double > |
| the cost of a move: an integer with 4 moves, a real with 8 | |
Public Member Functions | |
| GridAdjacency (const GridMap &map) | |
| constructor, copying the costs of the cells of the map | |
| template<class F> | |
| void | for_each (std::uint32_t s, int x, int y, F &&f) const |
| calls f( t , x' , y' , c ) for each free cell t = ( x' , y' ) next to the free cell s = ( x , y ), c being the cost of the move | |
the moves from a cell of a GridMap and their costs, on the GridGraph of ADS
The interface is that of the GridAdjacency of Grid.h, and so are the moves and their costs (MoveCost::LEFT, with \( \sqrt{2} \) to a corner); the cells are visited in increasing order of index. The row of the cell s = ( x , y ) starts at s - x, so a neighbour t is in the row above, in the same one or in the row below by comparing t with that start, and its column follows with no division.
| using cost_type = std::conditional_t< Moves == 4 , int , double > |
the cost of a move: an integer with 4 moves, a real with 8
|
inlineexplicit |
constructor, copying the costs of the cells of the map
|
inline |
calls f( t , x' , y' , c ) for each free cell t = ( x' , y' ) next to the free cell s = ( x , y ), c being the cost of the move