亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? fastvector.java

?? 數據挖掘算法(Apriori)--JAVA實現
?? JAVA
字號:
//Container Interface
//package apriori;
import java.util.*;
import java.io.*;

/**d
 * Implements a fast vector class without synchronized
 * methods. Replaces java.util.Vector. (Synchronized methods tend to
 * be slow.)
 *
 * @author Eibe Frank (eibe@cs.waikato.ac.nz)
 * @version $Revision: 1.7 $ */
public class FastVector implements Copyable, Serializable {

  /**
   * Class for enupackage Apriory;merating the vector's elements.
   */
  public class FastVectorEnumeration implements Enumeration {

    /** The counter. */
    private int m_Counter;

    /** The vector. */
    private FastVector m_Vector;

    /** Special element. Skipped during enumeration. */
    private int m_SpecialElement;

    /**
     * Constructs an enumeration.
     *
     * @param vector the vector which is to be enumerated
     */
    public FastVectorEnumeration(FastVector vector) {

      m_Counter = 0;
      m_Vector = vector;
      m_SpecialElement = -1;
    }

    /**
     * Constructs an enumeration with a special element.
     * The special element is skipped during the enumeration.
     *
     * @param vector the vector which is to be enumerated
     * @param special the index of the special element
     */
    public FastVectorEnumeration(FastVector vector, int special) {

      m_Vector = vector;
      m_SpecialElement = special;
      if (special == 0) {
	m_Counter = 1;
      } else {
	m_Counter = 0;
      }
    }


    /**
     * Tests if there are any more elements to enumerate.
     *
     * @return true if there are some elements left
     */
    public final boolean hasMoreElements() {

      if (m_Counter < m_Vector.size()) {
	return true;
      }
      return false;
    }

    /**
     * Returns the next element.
     *
     * @return the next element to be enumerated
     */
    public final Object nextElement() {

      Object result = m_Vector.elementAt(m_Counter);

      m_Counter++;
      if (m_Counter == m_SpecialElement) {
	m_Counter++;
      }
      return result;
    }
  }

  /** The array of objects. */
  private Object[] m_Objects;

  /** The current size; */
  private int m_Size;

  /** The capacity increment */
  private int m_CapacityIncrement;

  /** The capacity multiplier. */
  private double m_CapacityMultiplier;

  /**
   * Constructs an empty vector with initial
   * capacity zero.
   */
  public FastVector() {

    m_Objects = new Object[0];
    m_Size = 0;
    m_CapacityIncrement = 1;
    m_CapacityMultiplier = 2;
  }

  /**
   * Constructs a vector with the given capacity.
   *
   * @param capacity the vector's initial capacity
   */
  public FastVector(int capacity) {

    m_Objects = new Object[capacity];
    m_Size = 0;
    m_CapacityIncrement = 1;
    m_CapacityMultiplier = 2;
  }

  /**
   * Constructs a vector with the given capacity, capacity
   * increment and capacity mulitplier.
   *
   * @param capacity the vector's initial capacity
   */
  public FastVector(int capacity, int capIncrement,
		    double capMultiplier) {

    m_Objects = new Object[capacity];
    m_Size = 0;
    m_CapacityIncrement = capIncrement;
    m_CapacityMultiplier = capMultiplier;
  }

  /**
   * Adds an element to this vector. Increases its
   * capacity if its not large enough.
   *
   * @param element the element to add
   */
  public final void addElement(Object element) {

    Object[] newObjects;

    if (m_Size == m_Objects.length) {
      newObjects = new Object[(int)m_CapacityMultiplier *
			     (m_Objects.length +
			      m_CapacityIncrement)];
      System.arraycopy(m_Objects, 0, newObjects, 0, m_Size);
      m_Objects = newObjects;
    }
    m_Objects[m_Size] = element;
    m_Size++;
  }

  /**
   * Returns the capacity of the vector.
   *
   * @return the capacity of the vector
   */
  public final int capacity() {

    return m_Objects.length;
  }

  /**
   * Produces a shallow copy of this vector.
   *
   * @return the new vector
   */
  public final Object copy() {

    FastVector copy = new FastVector(m_Objects.length,
				     m_CapacityIncrement,
				     m_CapacityMultiplier);
    copy.m_Size = m_Size;
    System.arraycopy(m_Objects, 0, copy.m_Objects, 0, m_Size);
    return copy;
  }

  /**
   * Clones the vector and shallow copies all its elements.
   * The elements have to implement the Copyable interface.
   *
   * @return the new vector
   */
  public final Object copyElements() {

    FastVector copy = new FastVector(m_Objects.length,
				     m_CapacityIncrement,
				     m_CapacityMultiplier);
    copy.m_Size = m_Size;
    for (int i = 0; i < m_Size; i++) {
      copy.m_Objects[i] = ((Copyable)m_Objects[i]).copy();
    }
    return copy;
  }

  /**
   * Returns the element at the given position.
   *
   * @param index the element's index
   * @return the element with the given index
   */
  public final Object elementAt(int index) {

    return m_Objects[index];
  }

  /**
   * Returns an enumeration of this vector.
   *
   * @return an enumeration of this vector
   */
  public final Enumeration elements() {

    return new FastVectorEnumeration(this);
  }

  /**
   * Returns an enumeration of this vector, skipping the
   * element with the given index.
   *
   * @param index the element to skip
   * @return an enumeration of this vector
   */
  public final Enumeration elements(int index) {

    return new FastVectorEnumeration(this, index);
  }

  /**
   * Returns the first element of the vector.
   *
   * @return the first element of the vector
   */
  public final Object firstElement() {

    return m_Objects[0];
  }

  /**
   * Searches for the first occurence of the given argument,
   * testing for equality using the equals method.
   *
   * @param element the element to be found
   * @return the index of the first occurrence of the argument
   * in this vector; returns -1 if the object is not found
   */
  public final int indexOf(Object element) {

    for (int i = 0; i < m_Size; i++) {
      if (element.equals(m_Objects[i])) {
	return i;
      }
    }
    return -1;
  }

  /**
   * Inserts an element at the given position.
   *
   * @param element the element to be inserted
   * @param index the element's index
   */
  public final void insertElementAt(Object element, int index) {

    Object[] newObjects;

    if (m_Size < m_Objects.length) {
      System.arraycopy(m_Objects, index, m_Objects, index + 1,
                       m_Size - index);
      m_Objects[index] = element;
    } else {
      newObjects = new Object[(int)m_CapacityMultiplier *
			     (m_Objects.length +
			      m_CapacityIncrement)];
      System.arraycopy(m_Objects, 0, newObjects, 0, index);
      newObjects[index] = element;
      System.arraycopy(m_Objects, index, newObjects, index + 1,
		       m_Size - index);
      m_Objects = newObjects;
    }
    m_Size++;
  }

  /**
   * Returns the last element of the vector.
   *
   * @return the last element of the vector
   */
  public final Object lastElement() {

    return m_Objects[m_Size - 1];
  }

  /**
   * Deletes an element from this vector.
   *
   * @param index the index of the element to be deleted
   */
  public final void removeElementAt(int index) {

    System.arraycopy(m_Objects, index + 1, m_Objects, index,
                     m_Size - index - 1);
    m_Size--;
  }

  /**
   * Removes all components from this vector and sets its
   * size to zero.
   */
  public final void removeAllElements() {

    m_Objects = new Object[m_Objects.length];
    m_Size = 0;
  }

  /**
   * Appends all elements of the supplied vector to this vector.
   *
   * @param toAppend the FastVector containing elements to append.
   */
  public final void appendElements(FastVector toAppend) {

    setCapacity(size() + toAppend.size());
    System.arraycopy(toAppend.m_Objects, 0, m_Objects, size(), toAppend.size());
    m_Size = m_Objects.length;
  }

  /**
   * Returns all the elements of this vector as an array
   *
   * @param an array containing all the elements of this vector
   */
  public final Object [] toArray() {

    Object [] newObjects = new Object[size()];
    System.arraycopy(m_Objects, 0, newObjects, 0, size());
    return newObjects;
  }

  /**
   * Sets the vector's capacity to the given value.
   *
   * @param capacity the new capacity
   */
  public final void setCapacity(int capacity) {

    Object[] newObjects = new Object[capacity];

    System.arraycopy(m_Objects, 0, newObjects, 0, Math.min(capacity, m_Size));
    m_Objects = newObjects;
    if (m_Objects.length < m_Size)
      m_Size = m_Objects.length;
  }

  /**
   * Sets the element at the given index.
   *
   * @param element the element to be put into the vector
   * @param index the index at which the element is to be placed
   */
  public final void setElementAt(Object element, int index) {

    m_Objects[index] = element;
  }

  /**
   * Returns the vector's current size.
   *
   * @return the vector's current size
   */
  public final int size() {

    return m_Size;
  }

  /**
   * Swaps two elements in the vector.
   *
   * @param first index of the first element
   * @param second index of the second element
   */
  public final void swap(int first, int second) {

    Object help = m_Objects[first];

    m_Objects[first] = m_Objects[second];
    m_Objects[second] = help;
  }

  /**
   * Sets the vector's capacity to its size.
   */
  public final void trimToSize() {

    Object[] newObjects = new Object[m_Size];

    System.arraycopy(m_Objects, 0, newObjects, 0, m_Size);
    m_Objects = newObjects;
  }
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩一二区| 亚洲三级免费观看| 国产精品久久久久久久第一福利 | 成人性生交大片免费| 欧美亚洲国产bt| 久久久精品日韩欧美| 丝袜美腿高跟呻吟高潮一区| 99免费精品在线| 欧美mv日韩mv国产网站| 一二三区精品福利视频| 风间由美性色一区二区三区| 日韩精品中文字幕一区二区三区| 18成人在线观看| 国产河南妇女毛片精品久久久| 欧美精品久久久久久久多人混战| 亚洲色图20p| www.久久久久久久久| 精品盗摄一区二区三区| 免费观看成人av| 欧美猛男男办公室激情| 一区二区三区资源| 在线精品视频免费观看| 亚洲精品视频在线观看免费| 色综合色狠狠天天综合色| 中文字幕日韩av资源站| www.av精品| 国产精品福利影院| 99亚偷拍自图区亚洲| 中文字幕亚洲电影| 99国产精品久久久久久久久久| 国产精品青草综合久久久久99| 粉嫩av一区二区三区| 国产精品视频一二| 91色婷婷久久久久合中文| 亚洲少妇最新在线视频| 欧美色图天堂网| 午夜久久久久久久久久一区二区| 欧美日韩一区在线观看| 日本不卡在线视频| 久久久久久麻豆| 99久久综合狠狠综合久久| 亚洲免费观看高清完整版在线观看熊| 91视频xxxx| 免费人成在线不卡| 久久品道一品道久久精品| 成人午夜激情影院| 一级精品视频在线观看宜春院| 欧美日韩不卡在线| 国产精品资源网站| 亚洲欧美日韩久久精品| 欧美精品一二三| 国产一二三精品| 亚洲三级在线播放| 欧美一区二区三区免费| 懂色av一区二区三区免费观看| 一区二区激情小说| 欧美电影免费观看完整版| 成人免费看黄yyy456| 无码av免费一区二区三区试看| 欧美精品一区二区三区在线| 97精品久久久午夜一区二区三区| 亚洲成av人片在www色猫咪| 久久五月婷婷丁香社区| 欧美亚洲国产一区在线观看网站 | 欧美精品久久久久久久多人混战 | 奇米精品一区二区三区在线观看一| 日韩欧美国产精品一区| 99精品久久只有精品| 久久99国产精品免费网站| 亚洲男人都懂的| 久久日韩粉嫩一区二区三区| 欧美视频一区二区在线观看| 国产一区不卡视频| 日韩福利视频导航| 亚洲日本一区二区| 337p日本欧洲亚洲大胆精品| 欧美性大战xxxxx久久久| 国产传媒久久文化传媒| 日韩 欧美一区二区三区| 国产精品国产a| 久久久精品蜜桃| 日韩欧美激情四射| 在线观看91精品国产入口| 国产成人99久久亚洲综合精品| 天堂一区二区在线免费观看| 亚洲精品第1页| 中文字幕亚洲在| 国产日韩精品一区二区三区在线| 69堂亚洲精品首页| 欧美又粗又大又爽| www.欧美.com| 成人黄色电影在线| 国产伦精品一区二区三区免费迷| 午夜a成v人精品| 一级做a爱片久久| 亚洲免费毛片网站| 亚洲色图在线看| 国产精品亲子伦对白| 久久综合久久综合亚洲| 日韩欧美不卡一区| 欧美一级精品在线| 日韩一区二区三区在线视频| 正在播放亚洲一区| 欧美一区二区三区思思人| 欧美精品丝袜久久久中文字幕| 91福利视频网站| 欧美午夜不卡在线观看免费| 在线视频综合导航| 在线观看视频一区二区| 在线观看日韩电影| 欧美主播一区二区三区| 欧美日韩一级二级| 欧美肥胖老妇做爰| 日韩精品资源二区在线| 日韩欧美一区在线观看| 欧美xxxx老人做受| 久久久久久99久久久精品网站| 久久精品日韩一区二区三区| 久久先锋影音av鲁色资源网| 中文字幕乱码久久午夜不卡| 亚洲色大成网站www久久九九| 一区二区三区蜜桃网| 亚洲综合图片区| 偷拍亚洲欧洲综合| 韩国精品一区二区| 成人h动漫精品一区二| 在线一区二区三区四区| 69p69国产精品| 久久久噜噜噜久久中文字幕色伊伊 | 精品蜜桃在线看| 久久久久久久久久看片| 综合在线观看色| 亚洲va国产天堂va久久en| 男女激情视频一区| 国产一区二区在线观看免费| www.亚洲精品| 欧美日韩国产电影| 久久精品亚洲精品国产欧美kt∨| 国产精品无人区| 亚洲在线视频免费观看| 麻豆成人av在线| 粉嫩av一区二区三区在线播放| 在线精品视频免费观看| 精品欧美乱码久久久久久1区2区| 国产欧美一区二区三区鸳鸯浴 | 亚洲综合另类小说| 免费av网站大全久久| 成人av免费在线观看| 色婷婷av一区二区三区之一色屋| 91精品国产综合久久婷婷香蕉| 久久综合久久综合久久综合| 一区二区三区.www| 国产一区二区三区高清播放| 91豆麻精品91久久久久久| 久久伊99综合婷婷久久伊| 一区二区三区在线观看国产| 久久国产福利国产秒拍| 色婷婷精品久久二区二区蜜臀av| 精品少妇一区二区三区免费观看 | 欧美国产一区二区在线观看| 亚洲自拍偷拍欧美| 成人污视频在线观看| 欧美日韩一级片在线观看| 国产精品视频一二三| 韩国理伦片一区二区三区在线播放| 色老汉av一区二区三区| 精品国产欧美一区二区| 亚洲第一久久影院| youjizz久久| 国产日韩欧美高清在线| 日韩电影在线免费| 欧美色手机在线观看| 日韩一区在线看| 国产成a人亚洲| 久久久久久影视| 久久99蜜桃精品| 日韩一区二区电影网| 亚洲成国产人片在线观看| 97成人超碰视| 国产亚洲女人久久久久毛片| 免费观看在线综合| 日韩一区国产二区欧美三区| 亚洲一二三区不卡| 色吊一区二区三区| 中文字幕一区二区三区在线不卡| 国产a精品视频| 国产欧美视频一区二区三区| 激情丁香综合五月| 亚洲精品一区二区三区在线观看 | 六月丁香婷婷久久| 欧美一级久久久久久久大片| 日日噜噜夜夜狠狠视频欧美人 | 国产精品久久久久久久午夜片 | 亚洲精品国产高清久久伦理二区| 成人免费视频caoporn| 国产精品第四页| 92精品国产成人观看免费| 18欧美亚洲精品| 在线看国产日韩| 日韩国产精品久久久|