42 std::vector<pgr_mst_rt>
45 std::vector < int64_t > sources,
47 std::sort(sources.begin(), sources.end());
49 std::unique(sources.begin(), sources.end()),
55 graph, sources, max_depth);
63 int64_t *start_vidsArr,
64 size_t size_start_vidsArr,
73 std::ostringstream log;
74 std::ostringstream err;
75 std::ostringstream notice;
86 log <<
"Inserting vertices into a c++ vector structure";
88 start_vertices(start_vidsArr, start_vidsArr + size_start_vidsArr);
90 std::vector<pgr_mst_rt> results;
92 log <<
"Working with directed Graph\n";
101 log <<
"Working with Undirected Graph\n";
111 auto count = results.size();
114 (*return_tuples) = NULL;
117 "No traversal found";
118 *log_msg =
pgr_msg(notice.str().c_str());
122 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
123 log <<
"\nConverting a set of traversals into the tuples";
124 for (
size_t i = 0; i < count; i++) {
125 *((*return_tuples) + i) = results[i];
127 (*return_count) = count;
130 *log_msg = log.str().empty()?
133 *notice_msg = notice.str().empty()?
137 (*return_tuples) =
pgr_free(*return_tuples);
139 err << except.
what();
140 *err_msg =
pgr_msg(err.str().c_str());
141 *log_msg =
pgr_msg(log.str().c_str());
142 }
catch (std::exception &except) {
143 (*return_tuples) =
pgr_free(*return_tuples);
145 err << except.what();
146 *err_msg =
pgr_msg(err.str().c_str());
147 *log_msg =
pgr_msg(log.str().c_str());
149 (*return_tuples) =
pgr_free(*return_tuples);
151 err <<
"Caught unknown exception!";
152 *err_msg =
pgr_msg(err.str().c_str());
153 *log_msg =
pgr_msg(log.str().c_str());