Go to the source code of this file.
◆ do_pgr_bipartite()
void do_pgr_bipartite |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
pgr_bipartite_rt ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 53 of file bipartite_driver.cpp.
61 std::ostringstream log;
62 std::ostringstream notice;
63 std::ostringstream err;
77 undigraph.insert_edges(data_edges, total_edges);
78 std::vector<pgr_bipartite_rt> results;
81 logstr += fn_Bipartite.
get_log();
83 auto count = results.size();
85 (*return_tuples) = NULL;
87 *log_msg = log.str().empty()?
90 *notice_msg = notice.str().empty()?
95 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
96 for (
size_t i = 0; i < count; i++) {
97 *((*return_tuples) + i) = results[i];
99 (*return_count) = count;
102 *log_msg = log.str().empty()?
105 *notice_msg = notice.str().empty()?
109 (*return_tuples) =
pgr_free(*return_tuples);
111 err << except.
what();
112 *err_msg =
pgr_msg(err.str().c_str());
113 *log_msg =
pgr_msg(log.str().c_str());
114 }
catch (std::exception &except) {
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());
121 (*return_tuples) =
pgr_free(*return_tuples);
123 err <<
"Caught unknown exception!";
124 *err_msg =
pgr_msg(err.str().c_str());
125 *log_msg =
pgr_msg(log.str().c_str());
References pgrouting::Pgr_messages::get_log(), pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_alloc(), pgrouting::functions::Pgr_Bipartite< G >::pgr_bipartite(), pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process().