예제 #1
0
        public void run()
        {
            MGraph pMGraph = new MGraph();

            pMGraph.init(3, 3, 1, 1);

            List <Vertex> vertList;
            FileStream    pFile     = new FileStream("E:\\aaa.txt", FileMode.Create);
            string        strStream = "";

            vertList = test5Stop(pMGraph);
            serializePath(vertList, ref strStream);
            pMGraph.clearAllStopPoint();
            pMGraph.clearPath();

            vertList = test4Stop(pMGraph);
            serializePath(vertList, ref strStream);
            pMGraph.clearAllStopPoint();
            pMGraph.clearPath();

            vertList = test2Stop(pMGraph);
            serializePath(vertList, ref strStream);
            pMGraph.clearAllStopPoint();
            pMGraph.clearPath();

            vertList = test2Stop(pMGraph);
            serializePath(vertList, ref strStream);
            pMGraph.clearAllStopPoint();
            pMGraph.clearPath();

            byte[] inBytes = System.Text.Encoding.UTF8.GetBytes(strStream);
            pFile.Write(inBytes, 0, inBytes.Length);
            pFile.Close();
            pFile.Dispose();
        }