namespace HeuristicLab.Problems.RoutePlanning.RoutingGraph { public class Vertex { private long id; public long Id { get { return id; } set { id = value; } } private double longitude; public double Logitude { get { return longitude; } set { longitude = value; } } private double latitude; public double Latitude { get { return latitude; } set { latitude = value; } } public Vertex(long id) { this.id = id; } public Vertex(long id, double longitude, double latitude) { this.id = id; this.longitude = longitude; this.latitude = latitude; } public static bool operator ==(Vertex v1, Vertex v2) { if ((object)v1 == null) { if ((object)v2 == null) { return true; } return false; } if ((object)v1 == null && (object)v2 != null) { return false; } return v1.Equals(v2); } public static bool operator !=(Vertex v1, Vertex v2) { return !(v1 == v2); } public override bool Equals(object obj) { if (obj is Vertex) { Vertex v = (obj as Vertex); return (this.id == v.id); //TODO: } return false; } public override int GetHashCode() { return id.GetHashCode() ^ latitude.GetHashCode() ^ longitude.GetHashCode(); } public override string ToString() { return string.Format("{0}", id); } } }