#include <stddef.h>
#include "c_types/pgr_edge_t.h"
#include "c_types/matrix_cell_t.h"
Go to the source code of this file.
◆ do_pgr_floydWarshall()
void do_pgr_floydWarshall |
( |
pgr_edge_t * |
data_edges, |
|
|
size_t |
total_tuples, |
|
|
bool |
directedFlag, |
|
|
Matrix_cell_t ** |
ret_matrix, |
|
|
size_t * |
return_tuple_count, |
|
|
char ** |
log_msg, |
|
|
char ** |
err_msg |
|
) |
| |
Definition at line 42 of file floydWarshall_driver.cpp.
51 std::ostringstream log;
52 std::ostringstream err;
64 log <<
"Processing Directed graph\n";
66 digraph.insert_edges(data_edges, total_tuples);
69 log <<
"Processing Undirected graph\n";
71 undigraph.insert_edges(data_edges, total_tuples);
76 if (*return_count == 0) {
77 err <<
"No result generated, report this error\n";
78 *err_msg =
pgr_msg(err.str().c_str());
79 *return_tuples = NULL;
84 *log_msg = log.str().empty()?
88 (*return_tuples) =
pgr_free(*return_tuples);
91 *err_msg =
pgr_msg(err.str().c_str());
92 *log_msg =
pgr_msg(log.str().c_str());
93 }
catch (std::exception &except) {
94 (*return_tuples) =
pgr_free(*return_tuples);
97 *err_msg =
pgr_msg(err.str().c_str());
98 *log_msg =
pgr_msg(log.str().c_str());
100 (*return_tuples) =
pgr_free(*return_tuples);
102 err <<
"Caught unknown exception!";
103 *err_msg =
pgr_msg(err.str().c_str());
104 *log_msg =
pgr_msg(log.str().c_str());
References DIRECTED, pgrouting::graph::Pgr_base_graph< G, T_V, T_E >::insert_edges(), pgassert, pgr_floydWarshall(), pgr_free(), pgr_msg(), UNDIRECTED, and AssertFailedException::what().
Referenced by process().