osrm-backend/include/engine/algorithm.hpp

92 lines
2.0 KiB
C++
Raw Normal View History

#ifndef OSRM_ENGINE_ALGORITHM_HPP
#define OSRM_ENGINE_ALGORITHM_HPP
#include <type_traits>
namespace osrm
{
namespace engine
{
namespace algorithm
{
// Contraction Hiearchy
2017-02-25 00:13:38 -05:00
struct CH final
{
};
// Contraction Hiearchy with core
2017-02-25 00:13:38 -05:00
struct CoreCH final
{
};
template<typename AlgorithmT> const char* name();
template<> inline const char* name<CH>() { return "CH"; }
template<> inline const char* name<CoreCH>() { return "CoreCH"; }
}
namespace algorithm_trais
{
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
{
};
template <typename AlgorithmT> struct HasGetTileTurns final : std::false_type
{
};
2017-02-25 00:13:38 -05:00
template <> struct HasAlternativePathSearch<algorithm::CH> final : std::true_type
{
};
template <> struct HasShortestPathSearch<algorithm::CH> final : std::true_type
{
};
template <> struct HasDirectShortestPathSearch<algorithm::CH> final : std::true_type
{
};
template <> struct HasMapMatching<algorithm::CH> final : std::true_type
{
};
template <> struct HasManyToManySearch<algorithm::CH> final : std::true_type
{
};
template <> struct HasGetTileTurns<algorithm::CH> final : std::true_type
{
};
2017-02-25 00:13:38 -05:00
// disbaled because of perfomance reasons
template <> struct HasAlternativePathSearch<algorithm::CoreCH> final : std::false_type
{
};
template <> struct HasManyToManySearch<algorithm::CoreCH> final : std::false_type
{
};
template <> struct HasShortestPathSearch<algorithm::CoreCH> final : std::true_type
{
};
template <> struct HasDirectShortestPathSearch<algorithm::CoreCH> final : std::true_type
{
};
template <> struct HasMapMatching<algorithm::CoreCH> final : std::true_type
{
};
template <> struct HasGetTileTurns<algorithm::CoreCH> final : std::true_type
{
};
}
}
}
#endif