|
| | ExplicitGraph (std::size_t n, state_type s, state_type t) |
| | constructor of a graph with n nodes and no arc, searched from s to t
|
| void | add_edge (state_type u, state_type v, Cost c, bool directed=false) |
| | adds the arc ( u , v ) of cost c, and ( v , u ) too unless directed
|
| void | set_heuristic (state_type u, Cost h) |
| | sets the heuristic value of the node u
|
| void | set_source (state_type s) |
| | sets the source of the search
|
| state_type | initial_state (void) const noexcept |
| bool | is_goal (state_type s) const noexcept |
| std::uint64_t | hash (state_type s) const noexcept |
| Cost | heuristic (state_type s) const noexcept |
| template<class F> |
| void | for_each_successor (state_type s, Cost, F &&f) const |
| std::size_t | num_features (void) const noexcept |
| template<class F> |
| void | for_each_feature (state_type s, F &&f) const |
| std::uint64_t | perfect_hash (state_type s) const noexcept |
| | the perfect hash: the node
|
| std::size_t | size (void) const noexcept |
| | the number of nodes
|
template<class Cost = int>
class PBeFS_di_unipi_it::ExplicitGraph< Cost >
a weighted graph given explicitly, searched from a source to a target
The nodes are \( 0 , \ldots , n - 1 \); add_edge() adds an arc (or an edge) with its cost, and set_heuristic() gives \( h \) node by node (0 by default). The states are the nodes, and the features of Zobrist hashing and the perfect hash too. The arcs are kept in an ExplicitAdjacency, whose order of the arcs leaving a node is that of their insertion in every set but boost; in the set ads, a loop ( u , u ) is not kept, as it never shortens a path.