示例#1
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            var hashCode = 0;

            unchecked
            {
                hashCode ^= SourceVertex.GetHashCode() * 31;
                hashCode ^= TargetVertex.GetHashCode() * 31;
                hashCode ^= Weight.GetHashCode() * 31;
            }
            return(hashCode);
        }
 /// <summary>
 /// Gets a hash code for this <see cref="DirectedWeightedEdge{TVertex}"/>.
 /// </summary>
 /// <returns>
 /// A hash code for the current <see cref="DirectedWeightedEdge{TVertex}"/>.
 /// </returns>
 public override int GetHashCode()
 {
     return(SourceVertex.GetHashCode()
            ^ DestinationVertex.GetHashCode()
            ^ Weight.GetHashCode());
 }