62 pgr_edge_t *edges_of_points,
size_t total_edges_of_points,
64 int64_t *start_pidsArr,
size_t s_len,
76 std::ostringstream log;
77 std::ostringstream notice;
78 std::ostringstream err;
92 std::vector<Point_on_edge_t>(
94 points_p + total_points),
95 std::vector< pgr_edge_t >(
97 edges_of_points + total_edges_of_points),
105 *log_msg =
pgr_msg(log.str().c_str());
106 *err_msg =
pgr_msg(err.str().c_str());
115 std::vector<int64_t> start_vids(
116 start_pidsArr, start_pidsArr + s_len);
121 std::deque< Path >paths;
128 digraph, start_vids, distance, equiCost, log);
135 undigraph, start_vids, distance, equiCost, log);
138 for (
auto &path : paths) {
145 std::sort(path.begin(), path.end(),
147 {return l.node < r.node;});
148 std::stable_sort(path.begin(), path.end(),
150 {return l.agg_cost < r.agg_cost;});
158 *notice_msg =
pgr_msg(
"No return values was found");
161 *return_tuples =
pgr_alloc(count, (*return_tuples));
163 *log_msg = log.str().empty()?
166 *notice_msg = notice.str().empty()?
170 (*return_tuples) =
pgr_free(*return_tuples);
172 err << except.
what();
173 *err_msg =
pgr_msg(err.str().c_str());
174 *log_msg =
pgr_msg(log.str().c_str());
175 }
catch (std::exception &except) {
176 (*return_tuples) =
pgr_free(*return_tuples);
178 err << except.what();
179 *err_msg =
pgr_msg(err.str().c_str());
180 *log_msg =
pgr_msg(log.str().c_str());
182 (*return_tuples) =
pgr_free(*return_tuples);
184 err <<
"Caught unknown exception!";
185 *err_msg =
pgr_msg(err.str().c_str());
186 *log_msg =
pgr_msg(log.str().c_str());