最短路径算法

import java.util.Scanner;
class GraphMatrix2
{
    static final int MaxNum=20;
    char[] Vertex=new char[MaxNum];
    int GType;
    int VertexNum;
    int EdgeNum;
    int[][] EdgeWeight=new int [MaxNum][MaxNum];
    int[] isTrav=new int[MaxNum];
}
public class ShortestPath {
    
        static final int MaxValue=67777;
        static int[] path=new int [GraphMatrix2.MaxNum];
        static int[] tmpvertex=new int [GraphMatrix2.MaxNum];
        static Scanner input= new Scanner(System.in);
        static void CreateGraph(GraphMatrix2 GM)
        {
            int i,j,k;
            int weight;
            char EstartV,EendV; //  start and end vertex of of edge;
            
            System.out.println("enter the info. of graph");
            for(i=0;i0)
                {
                    path[i]=vend;
                }
            }
            for(i=0;i

你可能感兴趣的:(最短路径算法)