|
PBeFS
Parallel Best-First Search
|
a trip on the road map of Romania More...
#include <PBeFS/astar/Romania.h>
Classes | |
| struct | Road |
| a road and its length in km More... | |
Public Types | |
| enum | City : std::uint32_t { Arad , Bucharest , Craiova , Drobeta , Eforie , Fagaras , Giurgiu , Hirsova , Iasi , Lugoj , Mehadia , Neamt , Oradea , Pitesti , Rimnicu , Sibiu , Timisoara , Urziceni , Vaslui , Zerind , NCities } |
| the cities, in alphabetical order More... | |
| Public Types inherited from ExplicitGraph< double > | |
| using | state_type |
| a node | |
| using | cost_type |
| the cost type | |
Public Member Functions | |
| Romania (City from=Arad, City to=Bucharest) | |
| constructor of the trip from the city from to the city to | |
| Public Member Functions inherited from ExplicitGraph< double > | |
| 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, double c, bool directed=false) |
| adds the arc ( u , v ) of cost c, and ( v , u ) too unless directed | |
| void | set_heuristic (state_type u, double 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 |
| double | heuristic (state_type s) const noexcept |
| void | for_each_successor (state_type s, double, F &&f) const |
| std::size_t | num_features (void) const noexcept |
| 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 | |
Static Public Member Functions | |
| static const char * | name (std::uint32_t c) |
| the name of the city c | |
| static City | find (const std::string &city_name) |
| the city called name, NCities if there is none | |
| static const std::array< Road, 23 > & | roads (void) |
| the roads of figure 3.2 of the book | |
a trip on the road map of Romania
The cities are Arad, Bucharest, Craiova, Drobeta, Eforie, Fagaras, Giurgiu, Hirsova, Iasi, Lugoj, Mehadia, Neamt, Oradea, Pitesti, Rimnicu (Vilcea), Sibiu, Timisoara, Urziceni, Vaslui and Zerind, and the roads cost their length in km. Towards Bucharest the heuristic is the straight-line distance of figure 3.22 of the book; towards any other city it is the distance between the coordinates of the cities in aima-python (github.com/aimacode/aima-python), which on this map never exceeds the length of a road and is therefore consistent. The costs are real numbers, since the latter heuristic is not an integer.
| enum City : std::uint32_t |
constructor of the trip from the city from to the city to
|
inlinestaticnodiscard |
the city called name, NCities if there is none
|
inlinestaticnodiscard |
the name of the city c
|
inlinestaticnodiscard |
the roads of figure 3.2 of the book