|
PGROUTING
3.2
|
Go to the documentation of this file.
47 int64_t **return_tuples,
52 std::ostringstream log;
53 std::ostringstream err;
54 std::ostringstream notice;
66 log <<
"Working with Undirected Graph\n";
71 auto count = results.size();
74 (*return_tuples) = NULL;
77 "No paths found between start_vid and end_vid vertices";
81 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
83 for (
const auto edge : results) {
84 *((*return_tuples) + i) =
edge;
87 (*return_count) = count;
90 *log_msg = log.str().empty()?
93 *notice_msg = notice.str().empty()?
97 (*return_tuples) =
pgr_free(*return_tuples);
100 *err_msg =
pgr_msg(err.str().c_str());
101 *log_msg =
pgr_msg(log.str().c_str());
102 }
catch (std::exception &except) {
103 (*return_tuples) =
pgr_free(*return_tuples);
105 err << except.what();
106 *err_msg =
pgr_msg(err.str().c_str());
107 *log_msg =
pgr_msg(log.str().c_str());
109 (*return_tuples) =
pgr_free(*return_tuples);
111 err <<
"Caught unknown exception!";
112 *err_msg =
pgr_msg(err.str().c_str());
113 *log_msg =
pgr_msg(log.str().c_str());
T * pgr_alloc(std::size_t size, T *ptr)
allocates memory
char * pgr_msg(const std::string &msg)
virtual const char * what() const
void do_pgr_bridges(pgr_edge_t *data_edges, size_t total_edges, int64_t **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg)
#define pgassert(expr)
Uses the standard assert syntax.
void insert_edges(const T *edges, size_t count)
Inserts count edges of type T into the graph.
Identifiers< int64_t > bridges(pgrouting::UndirectedGraph &graph)
Bridges Bridges are closely related to the concept of articulation vertices, vertices that belong to ...
An assert functionality that uses C++ throw().
Extends std::exception and is the exception that we throw if an assert fails.