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

Function compatible

unit_tests/extractor/graph_compressor.cpp:39–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39bool compatible(Graph const &graph,
40 const std::vector<NodeBasedEdgeAnnotation> &node_data_container,
41 EdgeID const first,
42 EdgeID second)
43{
44 auto const &first_flags = graph.GetEdgeData(first).flags;
45 auto const &second_flags = graph.GetEdgeData(second).flags;
46 if (!(first_flags == second_flags))
47 return false;
48
49 if (graph.GetEdgeData(first).reversed != graph.GetEdgeData(second).reversed)
50 return false;
51
52 auto const &first_annotation = node_data_container[graph.GetEdgeData(first).annotation_data];
53 auto const &second_annotation = node_data_container[graph.GetEdgeData(second).annotation_data];
54
55 return first_annotation.CanCombineWith(second_annotation);
56}
57
58} // namespace
59

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 1

CanCombineWithMethod · 0.80

Tested by

no test coverage detected