Improved coding style
Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
parent
c95234c4ca
commit
8d8761d893
|
@ -7,8 +7,6 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class Apriori {
|
||||
|
||||
|
||||
private static List<int[]> itemsets = new ArrayList<int[]>();
|
||||
private static float minSup = 0.01f;
|
||||
private static String path = "transactions.txt";
|
||||
|
@ -78,7 +76,7 @@ public class Apriori {
|
|||
}
|
||||
}
|
||||
}
|
||||
itemsets = new ArrayList<int[]>(candidates);
|
||||
itemsets = new ArrayList<>(candidates);
|
||||
if (itemsets.size() > 0) {
|
||||
System.out.println(itemsets.size() + " Candidates for k=" + itemsets.get(0).length);
|
||||
} else {
|
||||
|
@ -103,15 +101,6 @@ public class Apriori {
|
|||
return true;
|
||||
}
|
||||
|
||||
private static boolean compare(int[] a, int[] b) {
|
||||
for (int i = 0; i < a.length; i++) {
|
||||
if (a[i] != b[i]) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void find_frequent_1_itemsets() {
|
||||
itemsets = new ArrayList<>();
|
||||
for (int i = 0; i < numItems; i++) {
|
||||
|
|
Loading…
Reference in New Issue