Skip to content

Commit 9ad0136

Browse files
committed
commit
1 parent 9e6c627 commit 9ad0136

File tree

40 files changed

+51
-18
lines changed

40 files changed

+51
-18
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package maxflowMincutBak;
2+
3+
import java.util.List;
4+
5+
/**
6+
* FordFulkerson 方法求最大流问题,每次从残存网路中找到一个最短距离和最小容量,知道最后最小容量为0,结束。
7+
* @author liyafei
8+
*
9+
*/
10+
public class FordFulkersonMethod {
11+
DijkstraAlgorithm da=new DijkstraAlgorithm(100, 0);
12+
int vertex=0,end=4;
13+
public void fordFulkerson(){
14+
List list=da.createGraph("/page425InAlgorithm");
15+
// List list=da.createGraph("/page425InAlgorithm.txt");
16+
List<List> list2=da.shortestPathOfBFS(vertex, end);
17+
double d=da.minValueofPath( list2.get(end));
18+
da.printShortestPathOfBFS(vertex, end);
19+
}
20+
}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package maxflowMincutBak;
2+
3+
import java.util.List;
4+
5+
/**
6+
* FordFulkerson 方法求最大流问题,每次从残存网路中找到一个最短距离和最小容量,知道最后最小容量为0,结束。
7+
* @author liyafei
8+
*
9+
*/
10+
public class FordFulkersonMethod {
11+
DijkstraAlgorithm da=new DijkstraAlgorithm(100, 0);
12+
int vertex=0,end=4;
13+
public void fordFulkerson(){
14+
List list=da.createGraph("/page425InAlgorithm");
15+
// List list=da.createGraph("/page425InAlgorithm.txt");
16+
List<List> list2=da.shortestPathOfBFS(vertex, end);
17+
double d=da.minValueofPath( list2.get(end));
18+
da.printShortestPathOfBFS(vertex, end);
19+
20+
21+
}
22+
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)