#include <stddef.h>
#include "c_types/pgr_edge_t.h"
#include "c_types/line_graph_rt.h"
Go to the source code of this file.
◆ do_pgr_lineGraph()
void do_pgr_lineGraph |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_edges, |
|
|
bool |
directed, |
|
|
Line_graph_rt ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 60 of file lineGraph_driver.cpp.
69 std::ostringstream log;
70 std::ostringstream err;
71 std::ostringstream notice;
83 digraph.insert_edges_neg(data_edges, total_edges);
85 log << digraph <<
"\n";
90 std::vector< Line_graph_rt > line_graph_edges;
91 line_graph_edges = line.get_postgres_results_directed();
92 auto count = line_graph_edges.size();
95 (*return_tuples) = NULL;
98 "Only vertices graph";
106 (*return_count) = sequence;
110 *log_msg = log.str().empty()?
113 *notice_msg = notice.str().empty()?
117 (*return_tuples) =
pgr_free(*return_tuples);
119 err << except.
what();
120 *err_msg =
pgr_msg(err.str().c_str());
121 *log_msg =
pgr_msg(log.str().c_str());
122 }
catch (std::exception &except) {
123 (*return_tuples) =
pgr_free(*return_tuples);
125 err << except.what();
126 *err_msg =
pgr_msg(err.str().c_str());
127 *log_msg =
pgr_msg(log.str().c_str());
129 (*return_tuples) =
pgr_free(*return_tuples);
131 err <<
"Caught unknown exception!";
132 *err_msg =
pgr_msg(err.str().c_str());
133 *log_msg =
pgr_msg(log.str().c_str());
References DIRECTED, get_postgres_result(), pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges_neg(), pgassert, pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process().