Пример #1
0
        // ²âÊÔ 3 ¸ö×èµ²µã
        public List <Vertex> test3Stop(MGraph pMGraph)
        {
            StopPoint pStopPoint = null;

            pStopPoint = new StopPoint();
            pMGraph.addStopPoint(1, 0, pStopPoint);

            pStopPoint = new StopPoint();
            pMGraph.addStopPoint(1, 1, pStopPoint);

            pStopPoint = new StopPoint();
            pMGraph.addStopPoint(1, 2, pStopPoint);

            List <Vertex> vertList;

            if (pMGraph.isPathCacheValid(0, 8))
            {
                vertList = pMGraph.getShortestPathFromPathCache(0, 8);
            }
            else
            {
                vertList = pMGraph.getOrCreateShortestPath(0, 8);
            }

            return(vertList);
        }
Пример #2
0
        // ²âÊÔ 0 ¸ö×èµ²µã
        public List <Vertex> test0Stop(MGraph pMGraph)
        {
            List <Vertex> vertList;

            if (pMGraph.isPathCacheValid(0, 4))
            {
                vertList = pMGraph.getShortestPathFromPathCache(0, 4);
            }
            else
            {
                vertList = pMGraph.getOrCreateShortestPath(0, 4);
            }

            return(vertList);
        }