Changeset 8434 for branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/OsmVertex.cs
- Timestamp:
- 08/08/12 14:12:50 (12 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/RoutePlanning/HeuristicLab.Problems.RoutePlanning/3.3/Graph/OsmVertex.cs
r8424 r8434 1 2 namespace HeuristicLab.Problems.RoutePlanning.Graph { 3 public class Vertex<T> { 1 namespace HeuristicLab.Problems.RoutePlanning.Graph { 2 public class OsmVertex<T> { 4 3 private static long idCounter = 0; 5 4 … … 14 13 } 15 14 16 public Vertex(T node) {15 public OsmVertex(T node) { 17 16 this.node = node; 18 17 this.id = idCounter++; 19 18 } 20 19 21 public static bool operator ==( Vertex<T> v1,Vertex<T> v2) {20 public static bool operator ==(OsmVertex<T> v1, OsmVertex<T> v2) { 22 21 if ((object)v1 == null) { 23 22 if ((object)v2 == null) { … … 32 31 } 33 32 34 public static bool operator !=( Vertex<T> v1,Vertex<T> v2) {33 public static bool operator !=(OsmVertex<T> v1, OsmVertex<T> v2) { 35 34 return !(v1 == v2); 36 35 } 37 36 38 37 public override bool Equals(object obj) { 39 if (obj is Vertex<T>) {40 Vertex<T> graph = (obj asVertex<T>);38 if (obj is OsmVertex<T>) { 39 OsmVertex<T> graph = (obj as OsmVertex<T>); 41 40 return this.Equals(graph); 42 41 }
Note: See TracChangeset
for help on using the changeset viewer.