- Timestamp:
- 08/20/12 17:32:19 (12 years ago)
- Location:
- branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/Graph.cs
r8479 r8509 25 25 vertices.TryGetValue(id, out vertex); 26 26 return vertex; 27 } 28 29 public List<Vertex> GetVertices() { 30 return new List<Vertex>(vertices.Values); 27 31 } 28 32 -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/IGraph.cs
r8479 r8509 5 5 void AddVertex(Vertex vertex); 6 6 Vertex GetVertex(long id); 7 List<Vertex> GetVertices(); 7 8 void AddEdge(long startId, long endId); 8 9 void AddEdge(Edge<Vertex> edge); -
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Osm.Data/OsmDataSource.cs
r8504 r8509 141 141 NameTable nt = new NameTable(); 142 142 string osmName = nt.Add("osm"); 143 stringnodeName = nt.Add("node");143 object nodeName = nt.Add("node"); 144 144 object tagName = nt.Add("tag"); 145 145 object wayName = nt.Add("way"); … … 147 147 string lonName = nt.Add("lon"); 148 148 string idName = nt.Add("id"); 149 stringndName = nt.Add("nd");149 object ndName = nt.Add("nd"); 150 150 string refName = nt.Add("ref"); 151 151 string kName = nt.Add("k"); … … 166 166 167 167 reader.Read(); 168 if (reader.LocalName.Equals(tagName)) { 169 reader.ReadToFollowing(nodeName, ns); 170 } 171 } 172 while (reader.LocalName.Equals(wayName)) { 168 //if (reader.LocalName.Equals(tagName)) { 169 if (ReferenceEquals(tagName, reader.LocalName)) { 170 reader.ReadToFollowing((string)nodeName, ns); 171 } 172 } 173 //while (reader.LocalName.Equals(wayName)) { 174 while (ReferenceEquals(wayName, reader.LocalName)) { 173 175 List<Vertex> way = new List<Vertex>(); 174 176 bool missingNodes = false; … … 177 179 178 180 reader.Read(); 179 while ( reader.LocalName.Equals(nodeName) || reader.LocalName.Equals(tagName)) {181 while (ReferenceEquals(ndName, reader.LocalName) || ReferenceEquals(tagName, reader.LocalName)) { 180 182 if (reader.LocalName.Equals(ndName)) { 181 183 long refNodeId = XmlConvert.ToInt64(reader.GetAttribute(refName, ns));
Note: See TracChangeset
for help on using the changeset viewer.