⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 row.java

📁 粗糙集是一种数据预处理算法
💻 JAVA
字号:
import java.lang.*;import java.util.Enumeration;import ItemSet;public class Row{  private ItemSet set;  private int support;  Row()  {    set = new ItemSet();    support = 0;  }  Row(ItemSet s)  {    set = new ItemSet(s);    support = 0;  }  Row(Row r)  {    set = new ItemSet(r.getSet());    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 set;  }  int getSupport()  {    return support;  }  void add(Object object)  {    set.add(object);  }  void incSupport()  {    ++support;  }  public String toString()  {    return(""+support+" "+set);  }  //  // 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(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] ) )        ++support;    }  }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -