-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest_Clustering.java
More file actions
46 lines (28 loc) · 1.02 KB
/
Test_Clustering.java
File metadata and controls
46 lines (28 loc) · 1.02 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package test_modular;
import java.io.IOException;
import java.util.ArrayList;
import force.Clustering;
import force.Clustering;
import force.Clustering.Cluster;
import force.Clustering.ClusteringStatistic;
import force.Clustering.GroupingRequirements;
import force.Clustering.RawData;
public class Test_Clustering {
public static void main(String[] args) throws IOException, InterruptedException {
ArrayList<Double> xs=new ArrayList<>();
ArrayList<Double> ys=new ArrayList<>();
for (int i = 0; i < 100; i++) {
xs.add(Math.random()*10);
ys.add(Math.random()*10);
}
RawData rd=new Clustering().new RawData(xs, ys, "trial");
rd.reportRawData();
ClusteringStatistic cs=new Clustering().new ClusteringStatistic();
Clustering aClustering=new Clustering();
GroupingRequirements gr=aClustering.new GroupingRequirements("oneTrial", 0.65, 15);
Cluster aCluster=aClustering.new Cluster(gr, rd, cs);
aCluster.doClustering();
aCluster.reportClustering();
aCluster.coveredPoints();
}
}