72 std::vector < pgr_mst_rt >
75 std::vector < int64_t > roots,
78 std::sort(roots.begin(), roots.end());
80 std::unique(roots.begin(), roots.end()),
84 auto results = fn_depthFirstSearch.
depthFirstSearch(graph, roots, directed, max_depth);
123 size_t size_rootsArr,
129 size_t *return_count,
134 std::ostringstream log;
135 std::ostringstream err;
136 std::ostringstream notice;
144 std::vector < int64_t > roots(rootsArr, rootsArr + size_rootsArr);
146 std::vector < pgr_mst_rt > results;
170 auto count = results.size();
173 (*return_tuples) = NULL;
175 notice <<
"No traversal found";
176 *log_msg =
pgr_msg(notice.str().c_str());
180 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
181 for (
size_t i = 0; i < count; i++) {
182 *((*return_tuples) + i) = results[i];
184 (*return_count) = count;
187 *log_msg = log.str().empty()?
190 *notice_msg = notice.str().empty()?
194 (*return_tuples) =
pgr_free(*return_tuples);
196 err << except.
what();
197 *err_msg =
pgr_msg(err.str().c_str());
198 *log_msg =
pgr_msg(log.str().c_str());
199 }
catch (std::exception &except) {
200 (*return_tuples) =
pgr_free(*return_tuples);
202 err << except.what();
203 *err_msg =
pgr_msg(err.str().c_str());
204 *log_msg =
pgr_msg(log.str().c_str());
206 (*return_tuples) =
pgr_free(*return_tuples);
208 err <<
"Caught unknown exception!";
209 *err_msg =
pgr_msg(err.str().c_str());
210 *log_msg =
pgr_msg(log.str().c_str());