Esempio n. 1
0
        /// <summary>
        /// Compares edges using <see cref="StartNode"/>, <see cref="EndNode"/>, <see cref="Distance"/> properties.
        /// </summary>
        /// <param name="obj"></param>
        /// <returns></returns>
        public override bool Equals(object obj)
        {
            var edge = obj as IEdge <T>;

            return(StartNode.Equals(edge.StartNode) &&
                   EndNode.Equals(edge.EndNode) &&
                   Distance.Equals(edge.Distance));
        }
Esempio n. 2
0
File: Arc.cs Progetto: Pogadi/viadf
        public override bool Equals(object O)
        {
            Arc A = (Arc)O;

            if (A == null)
            {
                throw new ArgumentException("Cannot compare " + GetType() + " with " + O.GetType());
            }
            return(StartNode.Equals(A.StartNode) && EndNode.Equals(A.EndNode));
        }