Go to the source code of this file.
|
void | do_pgr_LTDTree (pgr_edge_t *data_edges, size_t total_tuples, int64_t root_vertex, pgr_ltdtree_rt **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg) |
|
◆ do_pgr_LTDTree()
void do_pgr_LTDTree |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
int64_t |
root_vertex, |
|
|
pgr_ltdtree_rt ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 51 of file lengauerTarjanDominatorTree_driver.cpp.
60 std::ostringstream log;
61 std::ostringstream notice;
62 std::ostringstream err;
79 digraph.insert_edges(data_edges, total_edges);
80 std::vector<pgr_ltdtree_rt> results;
82 results = fn_LTDTree.
pgr_ltdtree(digraph, root_vertex);
87 auto count = results.size();
90 (*return_tuples) = NULL;
92 notice <<
"No result found";
93 *log_msg = log.str().empty()?
96 *notice_msg = notice.str().empty()?
101 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
102 for (
size_t i = 0; i < count; i++) {
103 *((*return_tuples) + i) = results[i];
105 (*return_count) = count;
108 *log_msg = log.str().empty()?
111 *notice_msg = notice.str().empty()?
115 (*return_tuples) =
pgr_free(*return_tuples);
117 err << except.
what();
118 *err_msg =
pgr_msg(err.str().c_str());
119 *log_msg =
pgr_msg(log.str().c_str());
120 }
catch (std::exception &except) {
121 (*return_tuples) =
pgr_free(*return_tuples);
123 err << except.what();
124 *err_msg =
pgr_msg(err.str().c_str());
125 *log_msg =
pgr_msg(log.str().c_str());
127 (*return_tuples) =
pgr_free(*return_tuples);
129 err <<
"Caught unknown exception!";
130 *err_msg =
pgr_msg(err.str().c_str());
131 *log_msg =
pgr_msg(log.str().c_str());
References DIRECTED, pgrouting::Pgr_messages::get_log(), pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_alloc(), pgr_free(), pgrouting::functions::Pgr_LTDTree< G >::pgr_ltdtree(), pgr_msg(), and AssertFailedException::what().
Referenced by process().