92 std::ostringstream log;
93 std::ostringstream err;
94 std::ostringstream notice;
107 std::deque<Path> paths;
108 std::vector<int64_t> start_vertices(start_vertex, start_vertex + s_len);
115 std::chrono::steady_clock::time_point begin_elapsed;
120 start_timing(start_t, begin_elapsed, begin);
121 log <<
"*********Creating graph at time: " << std::ctime(&start_t)
126 end_timing(start_t, begin_elapsed, begin, log);
130 start_timing(start_t, begin_elapsed, begin);
131 log <<
"********Inserting edges at time: " << std::ctime(&start_t)
134 digraph.insert_edges(data_edges, total_edges,
true);
136 end_timing(start_t, begin_elapsed, begin, log);
140 start_timing(start_t, begin_elapsed, begin);
141 log <<
"*******Calling the C++ call to pgr_drivingDistance: "
142 << std::ctime(&start_t) <<
"\n";
145 digraph, start_vertices, distance, equiCostFlag, log);
147 end_timing(start_t, begin_elapsed, begin, log);
151 start_timing(start_t, begin_elapsed, begin);
152 log <<
"******Creating graph at time: " << std::ctime(&start_t)
157 end_timing(start_t, begin_elapsed, begin, log);
161 start_timing(start_t, begin_elapsed, begin);
162 log <<
"*******Inserting edges at time: " << std::ctime(&start_t)
165 undigraph.insert_edges(data_edges, total_edges,
true);
167 end_timing(start_t, begin_elapsed, begin, log);
171 start_timing(start_t, begin_elapsed, begin);
172 log <<
"*******Calling the C++ call to pgr_drivingDistance: "
173 << std::ctime(&start_t) <<
"\n";
176 undigraph, start_vertices, distance, equiCostFlag, log);
178 end_timing(start_t, begin_elapsed, begin, log);
186 log <<
"\nNo return values were found";
187 *notice_msg =
pgr_msg(log.str().c_str());
190 *return_tuples =
pgr_alloc(count, (*return_tuples));
192 *return_count = trueCount;
195 *log_msg = log.str().empty()?
198 *notice_msg = notice.str().empty()?
202 (*return_tuples) =
pgr_free(*return_tuples);
204 err << except.
what();
205 *err_msg =
pgr_msg(err.str().c_str());
206 *log_msg =
pgr_msg(log.str().c_str());
207 }
catch (std::exception &except) {
208 (*return_tuples) =
pgr_free(*return_tuples);
210 err << except.what();
211 *err_msg =
pgr_msg(err.str().c_str());
212 *log_msg =
pgr_msg(log.str().c_str());
214 (*return_tuples) =
pgr_free(*return_tuples);
216 err <<
"Caught unknown exception!";
217 *err_msg =
pgr_msg(err.str().c_str());
218 *log_msg =
pgr_msg(log.str().c_str());