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

Method SetRestrictions

libs/routing/index_graph.cpp:210–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

208}
209
210void IndexGraph::SetRestrictions(RestrictionVec && restrictions)
211{
212 m_restrictionsForward.clear();
213 m_restrictionsBackward.clear();
214
215 base::HighResTimer timer;
216 for (auto const & restriction : restrictions)
217 {
218 ASSERT(!restriction.empty(), ());
219
220 auto & forward = m_restrictionsForward[restriction.back()];
221 forward.emplace_back(restriction.begin(), prev(restriction.end()));
222 reverse(forward.back().begin(), forward.back().end());
223
224 m_restrictionsBackward[restriction.front()].emplace_back(next(restriction.begin()), restriction.end());
225 }
226
227 LOG(LDEBUG, ("Restrictions are loaded in:", timer.ElapsedMilliseconds(), "ms"));
228}
229
230void IndexGraph::SetUTurnRestrictions(vector<RestrictionUTurn> && noUTurnRestrictions)
231{

Callers 1

DeserializeIndexGraphFunction · 0.45

Calls 9

ASSERTFunction · 0.85
backMethod · 0.80
frontMethod · 0.80
ElapsedMillisecondsMethod · 0.80
clearMethod · 0.45
emptyMethod · 0.45
emplace_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected