MCPcopy Create free account
hub / github.com/comaps/comaps / SetVertexAccessConditional

Method SetVertexAccessConditional

libs/routing/routing_tests/index_graph_tools.cpp:226–249  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

224}
225
226void TestIndexGraphTopology::SetVertexAccessConditional(Vertex v, RoadAccess::Type type, string const & condition)
227{
228 osmoh::OpeningHours openingHours(condition);
229 CHECK(openingHours.IsValid(), (condition));
230
231 bool found = false;
232 for (auto & r : m_edgeRequests)
233 {
234 if (r.m_from == v)
235 {
236 r.m_fromAccessConditionalType.Insert(type, std::move(openingHours));
237 found = true;
238 }
239 else if (r.m_to == v)
240 {
241 r.m_toAccessConditionalType.Insert(type, std::move(openingHours));
242 found = true;
243 }
244
245 if (found)
246 break;
247 }
248 CHECK(found, ("Cannot set access for vertex that is not in the graph", v));
249}
250
251bool TestIndexGraphTopology::FindPath(Vertex start, Vertex finish, double & pathWeight, vector<Edge> & pathEdges) const
252{

Callers

nothing calls this directly

Calls 2

IsValidMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected