From 8d83ce47e9149606afef8f875efa3c0207091607 Mon Sep 17 00:00:00 2001 From: DennisOSRM Date: Tue, 28 Feb 2012 15:33:31 +0100 Subject: [PATCH] Renaming vector --- Contractor/EdgeBasedGraphFactory.cpp | 18 +++++++++--------- Contractor/EdgeBasedGraphFactory.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Contractor/EdgeBasedGraphFactory.cpp b/Contractor/EdgeBasedGraphFactory.cpp index 21fca5968..7a2ce3e0b 100644 --- a/Contractor/EdgeBasedGraphFactory.cpp +++ b/Contractor/EdgeBasedGraphFactory.cpp @@ -38,15 +38,15 @@ EdgeBasedGraphFactory::EdgeBasedGraphFactory(int nodes, std::vectorEndEdges(v) - _nodeBasedGraph->BeginEdges(v); continue; } @@ -229,10 +229,10 @@ void EdgeBasedGraphFactory::Run() { EdgeBasedEdge newEdge(edgeBasedSource, edgeBasedTarget, v, nameID, distance, true, false, turnInstruction); edgeBasedEdges.push_back(newEdge); - if(_bollardNodes.Find(w) == true){ -// INFO("[" << w << "] loc: " << inputNodeInfoList[w].lat << "," << inputNodeInfoList[w].lon << ", tgt: " << edgeBasedTarget); + //Ways Ending at bollard get dead-end street treatment; + if(_barrierNodes.find(w) != _barrierNodes.end()){ //if node v is a bollard, then we need to add e2 as target node to the new set of edgebased nodes. - //Otherwise it will not be possible to route to route to this node + //Otherwise it will not be possible to properly route to this node EdgeBasedNode currentNode; currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID; currentNode.lat1 = inputNodeInfoList[v].lat; @@ -242,8 +242,8 @@ void EdgeBasedGraphFactory::Run() { currentNode.id = edgeBasedTarget; currentNode.ignoreInGrid = _nodeBasedGraph->GetEdgeData(e2).ignoreInGrid; edgeBasedNodes.push_back(currentNode); - } + if(_nodeBasedGraph->GetEdgeData(e1).type != SHRT_MAX ) { EdgeBasedNode currentNode; currentNode.nameID = _nodeBasedGraph->GetEdgeData(e1).nameID; diff --git a/Contractor/EdgeBasedGraphFactory.h b/Contractor/EdgeBasedGraphFactory.h index b08be9427..9476a1cc0 100644 --- a/Contractor/EdgeBasedGraphFactory.h +++ b/Contractor/EdgeBasedGraphFactory.h @@ -83,8 +83,8 @@ public: private: boost::shared_ptr<_NodeBasedDynamicGraph> _nodeBasedGraph; - HashTable _bollardNodes; - HashTable _trafficLights; + boost::unordered_map _barrierNodes; + boost::unordered_map _trafficLights; std::vector<_Restriction> & inputRestrictions; std::vector & inputNodeInfoList;