2022.4.1学习日记
弗洛伊德算法显示各点到各点最短距离和最短路径:
static int top=Integer.MAX_VALUE; public static void floyd(int[][] G){ int size=G.length; int D[][]=new int[G.length][G.length]; int Path[][]=new int[G.length][G.length]; // for(int i=0;i< size;i++){ // for(int j=0;j< size;j++){ // Path[i][j]=-1; // D[i][j]=G[i][j]; // } // } for(int i=0;i