Go to the source code of this file.
|
void | do_pgr_edwardMoore (pgr_edge_t *data_edges, size_t total_tuples, pgr_combination_t *combinations, size_t total_combinations, int64_t *start_vidsArr, size_t size_start_vidsArr, int64_t *end_vidsArr, size_t size_end_vidsArr, bool directed, General_path_element_t **return_tuples, size_t *return_count, char **log_msg, char **notice_msg, char **err_msg) |
|
◆ do_pgr_edwardMoore()
void do_pgr_edwardMoore |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
pgr_combination_t * |
combinations, |
|
|
size_t |
total_combinations, |
|
|
int64_t * |
start_vidsArr, |
|
|
size_t |
size_start_vidsArr, |
|
|
int64_t * |
end_vidsArr, |
|
|
size_t |
size_end_vidsArr, |
|
|
bool |
directed, |
|
|
General_path_element_t ** |
return_tuples, |
|
|
size_t * |
return_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
notice_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 82 of file edwardMoore_driver.cpp.
98 std::ostringstream log;
99 std::ostringstream err;
100 std::ostringstream notice;
110 pgassert((start_vidsArr && end_vidsArr) || combinations);
111 pgassert((size_start_vidsArr && size_end_vidsArr) || total_combinations);
115 log <<
"Inserting vertices into a c++ vector structure";
117 start_vertices(start_vidsArr, start_vidsArr + size_start_vidsArr);
118 std::vector< int64_t >
119 end_vertices(end_vidsArr, end_vidsArr + size_end_vidsArr);
120 std::vector< pgr_combination_t >
121 combinations_vector(combinations, combinations + total_combinations);
124 std::deque< Path >paths;
126 log <<
"\nWorking with directed Graph";
128 digraph.insert_edges(data_edges, total_edges);
135 log <<
"\nWorking with Undirected Graph";
137 undigraph.insert_edges(data_edges, total_edges);
150 (*return_tuples) = NULL;
154 *log_msg =
pgr_msg(notice.str().c_str());
158 (*return_tuples) =
pgr_alloc(count, (*return_tuples));
159 log <<
"\nConverting a set of paths into the tuples";
162 *log_msg = log.str().empty()?
165 *notice_msg = notice.str().empty()?
169 (*return_tuples) =
pgr_free(*return_tuples);
171 err << except.
what();
172 *err_msg =
pgr_msg(err.str().c_str());
173 *log_msg =
pgr_msg(log.str().c_str());
174 }
catch (std::exception &except) {
175 (*return_tuples) =
pgr_free(*return_tuples);
177 err << except.what();
178 *err_msg =
pgr_msg(err.str().c_str());
179 *log_msg =
pgr_msg(log.str().c_str());
181 (*return_tuples) =
pgr_free(*return_tuples);
183 err <<
"Caught unknown exception!";
184 *err_msg =
pgr_msg(err.str().c_str());
185 *log_msg =
pgr_msg(log.str().c_str());
References collapse_paths(), count_tuples(), DIRECTED, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_alloc(), pgr_edwardMoore(), pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process().