Exemple #1
0
        ///<summary>查找所有可能的路径</summary>
        ///<param name="from">起点</param>
        ///<param name="to">终点</param>
        ///<param name="max">给定最大路车站数</param>
        ///<returns>返回一个存储路径信息和路径距离的Dictionary</returns>
        public Dictionary <string, double> FindRoutes(string from, string to, Double max)
        {
            NetWork nw = InitNetWork();

            if (max.Equals(0))
            {
                max = Double.PositiveInfinity;
            }
            Traverse(nw.FindStop(from), nw.FindStop(to), nw, max);
            return(this.solu.ResultSet);
        }