forked from IvanLu1024/Java-Notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMain3.java
More file actions
25 lines (21 loc) · 801 Bytes
/
Copy pathMain3.java
File metadata and controls
25 lines (21 loc) · 801 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
package code_13_graph;
import java.util.Stack;
/**
* Created by 18351 on 2019/1/6.
*/
public class Main3 {
public static void main(String[] args) {
SparseGraph g1=new SparseGraph(13,false);
ReadGraph.readGraph(g1,"testG1.txt");
Component component=new Component(g1);
System.out.println("Num Of Component:"+component.getNum());
SparseGraph g2=new SparseGraph(6,false);
ReadGraph.readGraph(g2,"testG2.txt");
Component component2=new Component(g2);
System.out.println("Num Of Component:"+component2.getNum());
SparseGraph g3=new SparseGraph(2,false);
ReadGraph.readGraph(g3,"testG3.txt");
Component component3=new Component(g3);
System.out.println("Num Of Component:"+component3.getNum());
}
}