Go to the source code of this file.
|
void | do_pgr_combinations_dijkstra (pgr_edge_t *data_edges, size_t total_tuples, pgr_combination_t *combinations, size_t total_combinations, bool directed, bool only_cost, bool normal, int64_t n_goals, bool global, General_path_element_t **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg) |
|
void | do_pgr_many_to_many_dijkstra (pgr_edge_t *data_edges, size_t total_tuples, int64_t *start_vidsArr, size_t size_start_vidsArr, int64_t *end_vidsArr, size_t size_end_vidsArr, bool directed, bool only_cost, bool normal, int64_t n_goals, bool global, General_path_element_t **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg) |
|
◆ do_pgr_combinations_dijkstra()
void do_pgr_combinations_dijkstra |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
pgr_combination_t * |
combinations, |
|
|
size_t |
total_combinations, |
|
|
bool |
directed, |
|
|
bool |
only_cost, |
|
|
bool |
normal, |
|
|
int64_t |
n_goals, |
|
|
bool |
global, |
|
|
General_path_element_t ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 262 of file dijkstra_driver.cpp.
278 std::ostringstream log;
279 std::ostringstream err;
280 std::ostringstream notice;
294 std::vector<pgr_combination_t>
295 combinations_vector(combinations, combinations + total_combinations);
297 size_t n = n_goals <= 0? (std::numeric_limits<size_t>::max)() :
static_cast<size_t>(n_goals);
299 std::deque< Path >paths;
302 digraph.insert_edges(data_edges, total_edges);
306 only_cost, normal, n, global);
309 undigraph.insert_edges(data_edges, total_edges);
313 only_cost, normal, n, global);
315 combinations_vector.clear();
320 (*return_tuples) = NULL;
322 notice <<
"No paths found";
323 *log_msg =
pgr_msg(notice.str().c_str());
327 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
330 *log_msg = log.str().empty()?
333 *notice_msg = notice.str().empty()?
337 (*return_tuples) =
pgr_free(*return_tuples);
339 err << except.
what();
340 *err_msg =
pgr_msg(err.str().c_str());
341 *log_msg =
pgr_msg(log.str().c_str());
342 }
catch (std::exception &except) {
343 (*return_tuples) =
pgr_free(*return_tuples);
345 err << except.what();
346 *err_msg =
pgr_msg(err.str().c_str());
347 *log_msg =
pgr_msg(log.str().c_str());
349 (*return_tuples) =
pgr_free(*return_tuples);
351 err <<
"Caught unknown exception!";
352 *err_msg =
pgr_msg(err.str().c_str());
353 *log_msg =
pgr_msg(log.str().c_str());
References collapse_paths(), count_tuples(), DIRECTED, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_alloc(), detail::pgr_dijkstra(), pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process_combinations().
◆ do_pgr_many_to_many_dijkstra()
void do_pgr_many_to_many_dijkstra |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
int64_t * |
start_vidsArr, |
|
|
size_t |
size_start_vidsArr, |
|
|
int64_t * |
end_vidsArr, |
|
|
size_t |
size_end_vidsArr, |
|
|
bool |
directed, |
|
|
bool |
only_cost, |
|
|
bool |
normal, |
|
|
int64_t |
n_goals, |
|
|
bool |
global, |
|
|
General_path_element_t ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 158 of file dijkstra_driver.cpp.
176 std::ostringstream log;
177 std::ostringstream err;
178 std::ostringstream notice;
191 start_vertices(start_vidsArr, start_vidsArr + size_start_vidsArr);
192 std::vector< int64_t >
193 end_vertices(end_vidsArr, end_vidsArr + size_end_vidsArr);
195 size_t n = n_goals <= 0? (std::numeric_limits<size_t>::max)() :
static_cast<size_t>(n_goals);
197 std::deque< Path >paths;
200 digraph.insert_edges(data_edges, total_edges);
203 start_vertices, end_vertices,
204 only_cost, normal, n, global);
207 undigraph.insert_edges(data_edges, total_edges);
210 start_vertices, end_vertices,
211 only_cost, normal, n, global);
218 (*return_tuples) = NULL;
222 *log_msg =
pgr_msg(notice.str().c_str());
226 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
229 *log_msg = log.str().empty()?
232 *notice_msg = notice.str().empty()?
236 (*return_tuples) =
pgr_free(*return_tuples);
238 err << except.
what();
239 *err_msg =
pgr_msg(err.str().c_str());
240 *log_msg =
pgr_msg(log.str().c_str());
241 }
catch (std::exception &except) {
242 (*return_tuples) =
pgr_free(*return_tuples);
244 err << except.what();
245 *err_msg =
pgr_msg(err.str().c_str());
246 *log_msg =
pgr_msg(log.str().c_str());
248 (*return_tuples) =
pgr_free(*return_tuples);
250 err <<
"Caught unknown exception!";
251 *err_msg =
pgr_msg(err.str().c_str());
252 *log_msg =
pgr_msg(log.str().c_str());
References collapse_paths(), count_tuples(), DIRECTED, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_alloc(), detail::pgr_dijkstra(), pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process().