30 #ifndef INCLUDE_BDASTAR_PGR_BDASTAR_HPP_
31 #define INCLUDE_BDASTAR_PGR_BDASTAR_HPP_
47 namespace bidirectional {
49 template <
typename G >
81 m_log <<
"pgr_bdAstar constructor\n";
91 m_log <<
"pgr_bdAstar\n";
105 typename G::EO_i out, out_end;
107 auto current_cost = node.first;
108 auto current_node = node.second;
110 for (boost::tie(out, out_end) = out_edges(current_node,
graph.graph);
111 out != out_end; ++out) {
112 auto edge_cost =
graph[*out].cost;
113 auto next_node =
graph.adjacent(current_node, *out);
117 if (edge_cost + current_cost <
forward_cost[next_node]) {
131 typename G::EI_i in, in_end;
133 auto current_cost = node.first;
134 auto current_node = node.second;
136 for (boost::tie(in, in_end) = in_edges(current_node,
graph.graph);
137 in != in_end; ++in) {
138 auto edge_cost =
graph[*in].cost;
139 auto next_node =
graph.adjacent(current_node, *in);
169 current = std::fabs((std::max)(dx, dy)) *
m_factor;
172 current = std::fabs((std::min)(dx, dy)) *
m_factor;
178 current = std::sqrt(dx * dx + dy * dy) *
m_factor;
181 current = (std::fabs(dx) + std::fabs(dy)) *
m_factor;
197 #endif // INCLUDE_BDASTAR_PGR_BDASTAR_HPP_