/// <summary> /// Returns a hash code for this instance. /// </summary> /// <returns> /// A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. /// </returns> public override int GetHashCode() { var hashCode = 17; hashCode = hashCode * 23 + ToVertex.GetHashCode(); hashCode = hashCode * 23 + FromVertex.GetHashCode(); hashCode = hashCode * 23 + Weight.GetHashCode(); return(hashCode); }
public override int GetHashCode() { return(FromVertex.GetHashCode() ^ FromEndpoint.GetHashCode() ^ ToVertex.GetHashCode() ^ ToEndpoint.GetHashCode()); }