pre-filter turn restrictions for validity

This commit is contained in:
Moritz Kobitzsch
2017-07-19 14:21:11 +02:00
parent 2e9a7d9c1a
commit b1809d1667
4 changed files with 116 additions and 7 deletions
+23
View File
@@ -0,0 +1,23 @@
#ifndef OSRM_EXTRACTOR_RESTRICTION_FILTER_HPP_
#define OSRM_EXTRACTOR_RESTRICTION_FILTER_HPP_
#include "extractor/restriction.hpp"
#include "util/node_based_graph.hpp"
#include <vector>
namespace osrm
{
namespace extractor
{
// To avoid handling invalid restrictions / creating unnecessary duplicate nodes for via-ways, we do
// a pre-flight check for restrictions and remove all invalid restrictions from the data. Use as
// `restrictions = removeInvalidRestrictions(std::move(restrictions))`
std::vector<TurnRestriction> removeInvalidRestrictions(std::vector<TurnRestriction>,
const util::NodeBasedDynamicGraph &);
} // namespace extractor
} // namespace osrm
#endif // OSRM_EXTRACTOR_RESTRICTION_FILTER_HPP_