|
PGROUTING
3.2
|
Go to the documentation of this file.
53 std::ostringstream log;
54 std::ostringstream err;
55 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));
82 for (
size_t i = 0; i < count; i++) {
83 *((*return_tuples) + i) = results[i];
85 (*return_count) = count;
88 *log_msg = log.str().empty()?
91 *notice_msg = notice.str().empty()?
95 (*return_tuples) =
pgr_free(*return_tuples);
98 *err_msg =
pgr_msg(err.str().c_str());
99 *log_msg =
pgr_msg(log.str().c_str());
100 }
catch (std::exception &except) {
101 (*return_tuples) =
pgr_free(*return_tuples);
103 err << except.what();
104 *err_msg =
pgr_msg(err.str().c_str());
105 *log_msg =
pgr_msg(log.str().c_str());
107 (*return_tuples) =
pgr_free(*return_tuples);
109 err <<
"Caught unknown exception!";
110 *err_msg =
pgr_msg(err.str().c_str());
111 *log_msg =
pgr_msg(log.str().c_str());
std::vector< pgr_components_rt > biconnectedComponents(pgrouting::UndirectedGraph &graph)
Biconnected Components.
T * pgr_alloc(std::size_t size, T *ptr)
allocates memory
char * pgr_msg(const std::string &msg)
virtual const char * what() const
#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.
An assert functionality that uses C++ throw().
void do_pgr_biconnectedComponents(pgr_edge_t *data_edges, size_t total_edges, pgr_components_rt **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg)
Extends std::exception and is the exception that we throw if an assert fails.