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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? heap.java

?? clustering data for the different techniques of data mining
?? JAVA
字號:
/*  Heap.java	1.0 07/27/1999   Laurentiu Cristofor   Copyright (c) 1999 Laurentiu Cristofor  *//*GAClust - Clustering categorical databases using genetic algorithmsCopyright (C) 2002  Dana CristoforThis program is free software; you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation; either version 2 of the License, or (atyour option) any later version.This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNUGeneral Public License for more details.You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USAGAClust was written by Dana Cristofor (dana@cs.umb.edu).*//** * An implementation of a heap. Elements stored in the heap must * implement the Comparable interface. * * @author	Laurentiu Cristofor * @version 	1.0, July 27th, 1999 * */public class Heap{  private Comparable[] heap;  private int size;  private int capacity;  private int capacityIncrement;  /**   * Construct a heap with initial capacity 10    * and capacity increment 0   *   * @since   1.0   * */  public Heap()  {    this(10, 0);  }  /**   * Construct a heap with initial capacity c   * and capacity increment 0   *    * @param c   initial capacity for heap   * @exception IllegalArgumentException   c is negative   * @since   1.0   * */  public Heap(int c)  {    this(c, 0);  }  /**   * Construct a heap with initial capacity c   * and capacity increment ci   *    * @param c   initial capacity for heap   * @param ci  capacity increment for heap   * @exception IllegalArgumentException   c or ci is negative   * @since   1.0   * */  public Heap(int c, int ci)  {    if (c < 0 || ci < 0)      throw new IllegalArgumentException();        size              = 0;    capacity          = c;    capacityIncrement = ci;    heap = new Comparable[capacity + 1];  }  /**   * Return the size of the heap   *   * @return   the number of elements contained in the heap   * @since   1.0   * */  public int size()  {    return size;  }  /**   * Return the capacity of the heap   *   * @return   the size of the internal array used to store the heap   * @since   1.0   * */  public int capacity()  {    return capacity;  }  /**   * Insert an element into the heap   *    * @param value   object to insert   * @exception IllegalArgumentException   value is null   * @since   1.0   * */  public void insert(Comparable value)  {    if (value == null)      throw new IllegalArgumentException();    if (size == capacity)      {	if (capacityIncrement == 0)	  capacity *= 2;	else	  capacity += capacityIncrement;	Comparable[] temp = new Comparable[capacity + 1];	System.arraycopy(heap, 1, temp, 1, size);	heap = temp;      }    heap[++size] = value;     // add at end of array    siftUp(heap, size, size); // restore heap property  }  /**   * Remove top element from the heap   *    * @return   the element with the greatest value from the heap   * @exception EmptyHeapException   heap is empty   * @since   1.0   * */  public Comparable remove() throws EmptyHeapException  {    switch (size)      {      case 0:	throw new EmptyHeapException();	      case 1:	return heap[size--]; // special case for size = 1	      default:	Comparable ret = heap[1]; // will return top element	heap[1] = heap[size--];   // move last element at top and adjust size	siftDown(heap, size, 1);  // restore heap property	return ret;      }  }  /*   * Sift an element up to its correct place in the heap   *    * @param A   array containing the heap   * @param size   size of heap   * @param pos   position of element that we sift up   * @exception IllegalArgumentException   pos < 1 or pos > size    *                                       or size > A.length   * @since   1.0   * */  private static void siftUp(Comparable[] A, int size, int pos)  {    if (pos < 1 || pos > size || size > A.length)      throw new IllegalArgumentException();    int child  = pos;    int parent = child / 2;    Comparable value = A[child];    while (parent > 0)      {	if (A[parent].compareTo(value) < 0)	  {	    A[child] = A[parent];	    child = parent;	    parent = parent / 2;	  }	else	  break;      }    A[child] = value;  }  /*   * Sift an element down to its correct place in the heap   *    * @param A   array containing the heap   * @param size   size of heap   * @param pos   position of element that we sift down   * @exception IllegalArgumentException   pos < 1 or pos > size    *                                       or size > A.length   * @since   1.0   * */  private static void siftDown(Comparable[] A, int size, int pos)  {    if (pos < 1 || pos > size || size > A.length)      throw new IllegalArgumentException();    int parent = pos;    int child  = 2 * parent;    Comparable value = A[parent];    while (child <= size)      {	if (child < size && A[child].compareTo(A[child + 1]) < 0)	  child++;	if (A[child].compareTo(value) > 0)	  {	    A[parent] = A[child];	    parent    = child;	    child     = 2 * child;	  }	else	  break;      }    A[parent] = value;  }  /*   * Transform an array into a heap   *    * @param A   array that we want to transform into a heap   * @param size   number of elements   * @exception IllegalArgumentException   size > A.length   * @since   1.0   * */  private static void heapify(Comparable[] A, int size)  {    if (size > A.length)      throw new IllegalArgumentException();    for (int i = size / 2; i > 0; i--)      siftDown(A, size, i);  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲码国产岛国毛片在线| 一区二区三区91| 亚洲私人黄色宅男| 琪琪一区二区三区| 在线免费精品视频| 欧美激情在线免费观看| 午夜精品爽啪视频| 91视频国产资源| 欧美国产激情一区二区三区蜜月| 婷婷综合久久一区二区三区| 色诱视频网站一区| 国产色产综合产在线视频| 午夜影视日本亚洲欧洲精品| 91香蕉视频污| 国产精品丝袜一区| 丰满白嫩尤物一区二区| 日韩一区二区不卡| 日韩激情av在线| 欧美亚洲综合在线| 一区二区三区四区激情| 成人黄色小视频| 国产欧美一区二区三区沐欲 | 中文字幕在线播放不卡一区| 免费观看在线综合| 91精品国产综合久久福利软件| 亚洲女同女同女同女同女同69| 高清国产一区二区| 国产亚洲精品精华液| 国产精品亚洲成人| 欧美麻豆精品久久久久久| 亚洲午夜久久久久| 日韩精品一级中文字幕精品视频免费观看| 99久久伊人网影院| 国产精品丝袜在线| 成人av电影免费在线播放| 国产欧美日韩一区二区三区在线观看 | 免费欧美高清视频| 欧美一区二区三区小说| 日韩电影在线免费| 日韩视频免费观看高清完整版 | 欧美视频在线不卡| 亚洲午夜精品在线| 欧美日韩成人综合| 美腿丝袜亚洲三区| 精品伦理精品一区| 国产不卡一区视频| 亚洲日本在线天堂| 欧美日韩一区 二区 三区 久久精品| 亚洲夂夂婷婷色拍ww47| 欧美日韩一区二区三区四区| 婷婷丁香久久五月婷婷| 欧美va在线播放| 不卡视频在线观看| 亚洲国产成人精品视频| 日韩一区二区精品葵司在线| 狠狠色狠狠色合久久伊人| 国产精品美女久久久久久| 在线视频综合导航| 麻豆一区二区三| 国产精品久久久久一区二区三区| 91社区在线播放| 日本不卡123| 亚洲国产成人私人影院tom | 亚洲乱码国产乱码精品精小说| 在线观看国产91| 激情综合网最新| 亚洲婷婷综合色高清在线| 制服丝袜成人动漫| 久久99久久久欧美国产| 欧美日韩一区不卡| 午夜欧美电影在线观看| 欧美mv和日韩mv的网站| av在线这里只有精品| 香蕉影视欧美成人| 国产精品丝袜一区| 91麻豆精品国产91久久久使用方法 | 亚洲精品视频在线观看免费| 欧美精品乱人伦久久久久久| 国产成人综合精品三级| 一区二区三区蜜桃网| 久久精品视频在线看| 色就色 综合激情| 国产激情精品久久久第一区二区 | 精品精品国产高清a毛片牛牛| 久久av资源站| 亚洲六月丁香色婷婷综合久久| 欧美电视剧免费观看| 成人免费观看男女羞羞视频| 天天影视网天天综合色在线播放| 亚洲国产高清aⅴ视频| 日韩精品一区二区三区在线播放| 97精品久久久久中文字幕| 国产一区二区三区不卡在线观看| 亚洲综合区在线| 国产精品成人免费在线| 久久亚洲影视婷婷| 欧美一级欧美三级在线观看 | 久久久久99精品国产片| 欧美日韩国产一级片| 91日韩一区二区三区| 国产精品一级在线| 激情文学综合丁香| 美女视频黄 久久| 日本中文字幕一区二区视频| 亚洲一区二区欧美日韩| 亚洲免费在线看| 亚洲女性喷水在线观看一区| 国产精品久久久久一区| 欧美高清在线视频| 国产欧美视频一区二区三区| 久久免费看少妇高潮| 日韩精品一区二区三区老鸭窝| 欧美一区二区性放荡片| 欧美精品乱码久久久久久| 欧美三级电影网站| 欧美无人高清视频在线观看| 91片黄在线观看| 91麻豆免费看| 欧美系列在线观看| 欧美三级电影在线看| 欧美日韩精品一二三区| 欧美美女一区二区三区| 欧美日韩亚洲国产综合| 欧美欧美欧美欧美| 91精品在线免费观看| 欧美一级欧美三级| 欧美一区二区三区日韩| 亚洲精品一区二区三区99| 26uuu欧美| 国产精品二三区| 一二三区精品福利视频| 婷婷成人激情在线网| 日本特黄久久久高潮| 国模一区二区三区白浆| 国产成人av电影在线观看| 成人av在线资源网站| 在线视频观看一区| 日韩亚洲欧美一区二区三区| 久久久久久一级片| 亚洲日本在线观看| 丝袜美腿亚洲一区二区图片| 久久99在线观看| 成人avav影音| 欧美日韩免费不卡视频一区二区三区| 6080午夜不卡| 国产欧美日本一区视频| 亚洲国产精品久久久久秋霞影院| 老色鬼精品视频在线观看播放| 成人高清伦理免费影院在线观看| 欧美午夜在线观看| 久久久久久9999| 一区二区三区高清| 激情综合色综合久久| 91麻豆国产自产在线观看| 日韩一级黄色片| 亚洲免费电影在线| 国产在线精品免费| 色94色欧美sute亚洲线路二 | 欧美主播一区二区三区美女| 日韩视频一区二区在线观看| 国产精品久久久久影视| 美女国产一区二区| 99re这里都是精品| 精品国产凹凸成av人导航| 亚洲视频在线观看三级| 九一九一国产精品| 一本到不卡精品视频在线观看| 日韩一区二区免费在线观看| 中文字幕一区在线观看视频| 久久av资源站| 欧美精品在线视频| 综合网在线视频| 国产成人精品aa毛片| 欧美一区二区二区| 亚洲高清在线精品| 91玉足脚交白嫩脚丫在线播放| 精品日韩在线观看| 日韩国产欧美在线播放| 色婷婷激情综合| 国产精品久久久久精k8| 久草精品在线观看| 日韩午夜电影av| 亚洲成人一区二区在线观看| 91麻豆文化传媒在线观看| 欧美国产成人在线| 国产99精品在线观看| 欧美成人vps| 久久国内精品自在自线400部| 欧美三级日韩在线| 亚洲影视资源网| 成a人片亚洲日本久久| 国产麻豆精品theporn| 26uuu亚洲| 久久综合狠狠综合久久激情 | 欧美精品一区二区三区在线播放| 午夜在线成人av| 欧美影视一区在线| 亚洲一区二区三区四区在线观看| 91在线观看下载| 亚洲欧美另类久久久精品|