add support for visualising turn penalties in MLD Debug tiles (#4157)

- template function for tile functionality with edge finder operator
 - refactors unit tests into single function (reduce code duplication)
 - adds unit tests for core-ch
This commit is contained in:
Moritz Kobitzsch
2017-06-15 13:59:44 +02:00
committed by Daniel Patterson
parent 35550d8c0a
commit f80e5db346
6 changed files with 223 additions and 86 deletions
+3
View File
@@ -102,6 +102,9 @@ template <> struct HasShortestPathSearch<mld::Algorithm> final : std::true_type
template <> struct HasMapMatching<mld::Algorithm> final : std::true_type
{
};
template <> struct HasGetTileTurns<mld::Algorithm> final : std::true_type
{
};
}
}
}
-9
View File
@@ -221,15 +221,6 @@ RoutingAlgorithms<routing_algorithms::mld::Algorithm>::ManyToManySearch(
{
throw util::exception("ManyToManySearch is not implemented");
}
template <>
inline std::vector<routing_algorithms::TurnData>
RoutingAlgorithms<routing_algorithms::mld::Algorithm>::GetTileTurns(
const std::vector<datafacade::BaseDataFacade::RTreeLeaf> &,
const std::vector<std::size_t> &) const
{
throw util::exception("GetTileTurns is not implemented");
}
}
}
@@ -33,6 +33,11 @@ getTileTurns(const datafacade::ContiguousInternalMemoryDataFacade<ch::Algorithm>
const std::vector<RTreeLeaf> &edges,
const std::vector<std::size_t> &sorted_edge_indexes);
std::vector<TurnData>
getTileTurns(const datafacade::ContiguousInternalMemoryDataFacade<mld::Algorithm> &facade,
const std::vector<RTreeLeaf> &edges,
const std::vector<std::size_t> &sorted_edge_indexes);
} // namespace routing_algorithms
} // namespace engine
} // namespace osrm