2017-01-09 15:40:33 -05:00
|
|
|
#ifndef OSRM_ENGINE_ALGORITHM_HPP
|
|
|
|
#define OSRM_ENGINE_ALGORITHM_HPP
|
|
|
|
|
2017-02-24 21:22:17 -05:00
|
|
|
#include <type_traits>
|
|
|
|
|
2022-12-11 04:10:26 -05:00
|
|
|
namespace osrm::engine::routing_algorithms
|
2017-01-09 15:40:33 -05:00
|
|
|
{
|
|
|
|
|
|
|
|
// Contraction Hiearchy
|
2017-03-31 06:52:04 -04:00
|
|
|
namespace ch
|
|
|
|
{
|
|
|
|
struct Algorithm final
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2020-11-26 10:21:39 -05:00
|
|
|
} // namespace ch
|
2017-03-01 15:29:04 -05:00
|
|
|
// Multi-Level Dijkstra
|
2017-03-31 06:52:04 -04:00
|
|
|
namespace mld
|
|
|
|
{
|
|
|
|
struct Algorithm final
|
2017-03-01 15:29:04 -05:00
|
|
|
{
|
|
|
|
};
|
2020-11-26 10:21:39 -05:00
|
|
|
} // namespace mld
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2017-03-31 06:52:04 -04:00
|
|
|
// Algorithm names
|
|
|
|
template <typename AlgorithmT> const char *name();
|
|
|
|
template <> inline const char *name<ch::Algorithm>() { return "CH"; }
|
|
|
|
template <> inline const char *name<mld::Algorithm>() { return "MLD"; }
|
2017-01-09 15:40:33 -05:00
|
|
|
|
2018-03-27 05:44:13 -04:00
|
|
|
// Algorithm identifier
|
|
|
|
template <typename AlgorithmT> const char *identifier();
|
|
|
|
template <> inline const char *identifier<ch::Algorithm>() { return "ch"; }
|
|
|
|
template <> inline const char *identifier<mld::Algorithm>() { return "mld"; }
|
|
|
|
|
2017-02-25 00:13:38 -05:00
|
|
|
template <typename AlgorithmT> struct HasAlternativePathSearch final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
|
|
|
template <typename AlgorithmT> struct HasShortestPathSearch final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
|
|
|
template <typename AlgorithmT> struct HasDirectShortestPathSearch final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
|
|
|
template <typename AlgorithmT> struct HasMapMatching final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
|
|
|
template <typename AlgorithmT> struct HasManyToManySearch final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
2018-04-24 11:05:35 -04:00
|
|
|
template <typename AlgorithmT> struct SupportsDistanceAnnotationType final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
2017-02-25 00:13:38 -05:00
|
|
|
template <typename AlgorithmT> struct HasGetTileTurns final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
2017-08-16 16:21:19 -04:00
|
|
|
template <typename AlgorithmT> struct HasExcludeFlags final : std::false_type
|
2017-07-28 11:55:38 -04:00
|
|
|
{
|
|
|
|
};
|
2017-02-24 21:22:17 -05:00
|
|
|
|
2017-03-31 06:52:04 -04:00
|
|
|
// Algorithms supported by Contraction Hierarchies
|
|
|
|
template <> struct HasAlternativePathSearch<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasShortestPathSearch<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasDirectShortestPathSearch<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasMapMatching<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasManyToManySearch<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2018-04-24 11:05:35 -04:00
|
|
|
template <> struct SupportsDistanceAnnotationType<ch::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasGetTileTurns<ch::Algorithm> final : std::true_type
|
2017-02-25 00:13:38 -05:00
|
|
|
{
|
|
|
|
};
|
2017-08-20 19:24:05 -04:00
|
|
|
template <> struct HasExcludeFlags<ch::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-02-24 21:22:17 -05:00
|
|
|
|
2017-03-31 06:52:04 -04:00
|
|
|
// Algorithms supported by Multi-Level Dijkstra
|
2017-04-06 08:28:43 -04:00
|
|
|
template <> struct HasAlternativePathSearch<mld::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-03-31 06:52:04 -04:00
|
|
|
template <> struct HasDirectShortestPathSearch<mld::Algorithm> final : std::true_type
|
2017-03-01 15:29:04 -05:00
|
|
|
{
|
|
|
|
};
|
2017-04-03 06:50:37 -04:00
|
|
|
template <> struct HasShortestPathSearch<mld::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-03-31 05:29:48 -04:00
|
|
|
template <> struct HasMapMatching<mld::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-06-27 10:56:43 -04:00
|
|
|
template <> struct HasManyToManySearch<mld::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2018-04-24 11:05:35 -04:00
|
|
|
template <> struct SupportsDistanceAnnotationType<mld::Algorithm> final : std::false_type
|
|
|
|
{
|
|
|
|
};
|
2017-06-15 07:59:44 -04:00
|
|
|
template <> struct HasGetTileTurns<mld::Algorithm> final : std::true_type
|
|
|
|
{
|
|
|
|
};
|
2017-08-16 16:21:19 -04:00
|
|
|
template <> struct HasExcludeFlags<mld::Algorithm> final : std::true_type
|
2017-07-28 11:55:38 -04:00
|
|
|
{
|
|
|
|
};
|
2022-12-20 12:00:11 -05:00
|
|
|
} // namespace osrm::engine::routing_algorithms
|
2017-01-09 15:40:33 -05:00
|
|
|
|
|
|
|
#endif
|