NeighboringPathWay.cs 1.3 KB
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CtuDeviceLib
{
    /// <summary>
    /// 邻接路线
    /// </summary>
    public class NeighboringPathWay
    {
        /// <summary>
        /// 两路线的关键路标号
        /// </summary>
        public uint KeyLandmark {  get; set; }
        /// <summary>
        /// 起始路线编号
        /// </summary>
        public uint StartPathWay { get; set; }
        /// <summary>
        ///结束路线编号
        /// </summary>
        public uint EndPathWay { get; set;}
        /// <summary>
        /// 是否是双向路线
        /// </summary>
        public bool IsTwoWayLanes { get; set; }

        /// <summary>
        /// 是否是相同的邻接路线
        /// </summary>
        /// <param name="other"></param>
        /// <returns></returns>
        public bool IsSame( NeighboringPathWay other )
        {
            return other.IsTwoWayLanes == IsTwoWayLanes
                && KeyLandmark == other.KeyLandmark
                && ((StartPathWay == other.StartPathWay && EndPathWay == other.EndPathWay)||
                    (StartPathWay == other.EndPathWay && EndPathWay == other.StartPathWay));
        }
    }
}