28 #ifndef INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_
29 #define INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_
47 const std::vector< int64_t > &via_vertices,
48 std::deque< Path > &paths,
51 std::ostringstream &log) {
52 if (via_vertices.size() == 0) {
57 int64_t prev_vertex = via_vertices[0];
61 for (
const auto &vertex : via_vertices) {
63 prev_vertex = vertex; ++i;
68 if (!U_turn_on_edge && i > 1) {
73 if (path.
size() > 1) {
78 int64_t edge_to_be_removed = path[path.
size() - 2].edge;
79 int64_t last_vertex_of_path = prev_vertex;
82 if (graph.out_degree(last_vertex_of_path) > 1) {
83 log <<
"\ndeparting from " << last_vertex_of_path
84 <<
" deleting edge " << edge_to_be_removed <<
"\n";
85 graph.disconnect_out_going_edge(
92 log <<
"\nfrom " << prev_vertex <<
" to " << vertex;
95 if (!U_turn_on_edge && i > 1) {
96 graph.restore_graph();
102 log <<
"\nEmpty so again from "
103 << prev_vertex <<
" to " << vertex;
108 if (strict && path.
empty()) {
112 paths.push_back(path);
117 prev_vertex = vertex; ++i;
124 #endif // INCLUDE_DIJKSTRA_PGR_DIJKSTRAVIA_HPP_