MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / ManyToManySearch

Method ManyToManySearch

include/engine/routing_algorithms.hpp:196–225  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

194
195template <routing_algorithms::RoutingAlgorithm Algorithm>
196std::pair<std::vector<EdgeDuration>, std::vector<EdgeDistance>>
197RoutingAlgorithms<Algorithm>::ManyToManySearch(
198 const std::vector<PhantomNodeCandidates> &candidates_list,
199 const std::vector<std::size_t> &_source_indices,
200 const std::vector<std::size_t> &_target_indices,
201 const bool calculate_distance) const
202{
203 BOOST_ASSERT(!candidates_list.empty());
204
205 auto source_indices = _source_indices;
206 auto target_indices = _target_indices;
207
208 if (source_indices.empty())
209 {
210 source_indices.resize(candidates_list.size());
211 std::iota(source_indices.begin(), source_indices.end(), 0);
212 }
213 if (target_indices.empty())
214 {
215 target_indices.resize(candidates_list.size());
216 std::iota(target_indices.begin(), target_indices.end(), 0);
217 }
218
219 return routing_algorithms::manyToManySearch(heaps,
220 *facade,
221 candidates_list,
222 std::move(source_indices),
223 std::move(target_indices),
224 calculate_distance);
225}
226
227template <routing_algorithms::RoutingAlgorithm Algorithm>
228inline std::vector<routing_algorithms::TurnData> RoutingAlgorithms<Algorithm>::GetTileTurns(

Callers 2

HandleRequestMethod · 0.80
HandleRequestMethod · 0.80

Calls 6

manyToManySearchFunction · 0.50
emptyMethod · 0.45
resizeMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected