//拓扑排序 class TopologicalSort{ int[][] graph; int[] list; void input(int[][] graph){ this.graph=graph; list=new int[graph.length]; calculate(); } void calcul
package com.zhang.graph; import java.util.Vector; //有向加权图Dijkstra算法 public class NetWork { Vertex start; private class Vertex{ Object object; Edge edges; Vertex nextVer
之前看书学的,觉得写得挺容易懂的~~package com.zhang.pro2; import java.util.Vector; public class NetWork { Vertex start; private class Vertex{ Object object; Edge edges; Vertex nextVert
package com.java.struture; public class Mouse { private int startx, starty; private int endx,endy; private boolean success;//找到路径 public void setStart(int startx,int starty){
虽然是跟着学的,但实在米有改动。。。因为这两个算法的确就这样写的啦~~~所以直接把代码跟着敲一敲运行一遍放上来~~~package com.java.struture; import java.util.Scanner; public class MinPath { private static int INF = 999999; private int[][]map; p
Copyright © 2005-2024 51CTO.COM 版权所有 京ICP证060544号