55 std::ostringstream log;
56 std::ostringstream err;
57 std::ostringstream notice;
66 std::vector<pgr_boyer_t> results;
70 log <<
"Working with Undirected Graph\n";
75 logstr += fn_boyerMyrvold.
get_log();
79 auto count = results.size();
82 (*return_tuples) = NULL;
86 *log_msg =
pgr_msg(notice.str().c_str());
90 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
91 log <<
"\nConverting a set of traversals into the tuples";
92 for (
size_t i = 0; i < count; i++) {
93 *((*return_tuples) + i) = results[i];
95 (*return_count) = count;
98 *log_msg = log.str().empty()?
101 *notice_msg = notice.str().empty()?
105 (*return_tuples) =
pgr_free(*return_tuples);
107 err << except.
what();
108 *err_msg =
pgr_msg(err.str().c_str());
109 *log_msg =
pgr_msg(log.str().c_str());
110 }
catch (std::exception &except) {
111 (*return_tuples) =
pgr_free(*return_tuples);
113 err << except.what();
114 *err_msg =
pgr_msg(err.str().c_str());
115 *log_msg =
pgr_msg(log.str().c_str());
117 (*return_tuples) =
pgr_free(*return_tuples);
119 err <<
"Caught unknown exception!";
120 *err_msg =
pgr_msg(err.str().c_str());
121 *log_msg =
pgr_msg(log.str().c_str());