Skip to content

Commit a2ae2cb

Browse files
author
linyiqun
committed
Apriori中的项集先后顺序比较方法进行了改正
Apriori中的项集先后顺序比较方法进行了改正
1 parent 8826d7c commit a2ae2cb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

AssociationAnalysis/DataMining_Apriori/FrequentItem.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,10 @@ public void setLength(int length) {
4747
@Override
4848
public int compareTo(FrequentItem o) {
4949
// TODO Auto-generated method stub
50-
return this.getIdArray()[0].compareTo(o.getIdArray()[0]);
50+
Integer int1 = Integer.parseInt(this.getIdArray()[0]);
51+
Integer int2 = Integer.parseInt(o.getIdArray()[0]);
52+
53+
return int1.compareTo(int2);
5154
}
5255

5356
}

0 commit comments

Comments
 (0)