?? row.java
字號:
import java.lang.*;import java.util.Enumeration;import ItemSet;public class Row extends ItemSet{// private ItemSet set; private int support; Row() { super();// set = new ItemSet(); support = 0; } Row(ItemSet s) {// set = new ItemSet(s); super(s); support = 0; } Row(Row r) {// set = new ItemSet(r.getSet()); super(r); support = r.getSupport(); }/* public boolean equals ( Row obj ) { return( set.equals(obj.getSet()) ); }*//* public boolean equals( Object obj ) { if( obj instanceof Row ) return( this.equals( (Row) obj ) ); else return( false ); }*/ ItemSet getSet() { return this; } int getSupport() { return support; }/* void add(Object object) { set.add(object); }*//* void incSupport() { ++support; }*/ public String toString() { return(""+support+" "+super.toString()); } // // this contains super sets of s // public void updateSupport(ItemSet s) { Object o[] = s.toArray(); support = 0; for(int i=0; i<o.length; i++){ if( ((ItemSet)o[i]).subsetOf(this) )// if( ((ItemSet)o[i]).subsetOf(set) ) ++support; } } // // this contains sub sets of s // public void updateSupportA(ItemSet s) { Object o[] = s.toArray(); support = 0; for(int i=0; i<o.length; i++){// if( set.subsetOf( (ItemSet)o[i] ) ) if( this.subsetOf( (ItemSet)o[i] ) ) ++support; } }}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -