示例#1
0
        public virtual int CompareTo(WeightedEdge that)
        {
            if (this == that)
            {
                return(0);
            }
            int comparison = weight.compareTo(that.Weight);

            if (comparison != 0)
            {
                return(comparison);
            }

            return(base.CompareTo(that));
        }
示例#2
0
        public override bool Equals(object obj)
        {
            WeightedEdge e = (WeightedEdge)obj;

            return(weight.Equals(e.Weight) && base.Equals(obj));
        }