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

📄 row.java

📁 贝叶思网络分类规则例程
💻 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 + -