| 208 | } |
| 209 | |
| 210 | void 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 | |
| 230 | void IndexGraph::SetUTurnRestrictions(vector<RestrictionUTurn> && noUTurnRestrictions) |
| 231 | { |
no test coverage detected