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

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

?? priorityqueue.h

?? 這是一個從音頻信號里提取特征參量的程序
?? H
?? 第 1 頁 / 共 2 頁
字號:
      if (!v_d[i]->eq(*compare_queue_a.v_d[i])) {	are_equal = false;      }    }    else {      if (v_d[i] != compare_queue_a.v_d[i]) {	are_equal = false;      }    }  }    // return a value representing if they are equivalent  //  return are_equal;}//-------------------------------------------------------------------------//// required memory management methods////-------------------------------------------------------------------------// method: clear//// arguments: // Integral::CMODE cmode_a: (input) clear mode//  // return: a boolean value indicating status//// this method clears the contents of the list by the setting of cmode_a////  enum CMODE { RETAIN = 0, RESET, RELEASE, FREE, DEF_CMODE = RESET };//// RETAIN: call clear with RETAIN on each element in the queue//// RESET: clear the structure but don't necessarily delete memory//// RELEASE: clear the structure and release memory//// FREE: clear the structure and release memory//// Programming hint://// use the clear() method to manage the memory of the objects going// into the queue.// particular useful when queue is in USER mode. Caution the object// you place into queue must have a clear method that meets the// requirements of the IFC clear method.////template<class TObject>boolean PriorityQueue<TObject>::clear(Integral::CMODE cmode_a) {  // if the cmode_a is RETAIN or FREE, call clear(cmode_a) method for  // each element  //    if ((cmode_a == Integral::RETAIN) || (cmode_a == Integral::FREE)) {    // loop over all elements    //    for (long i = 0; i < (long)length_d; i++) {      v_d[i]->clear(cmode_a);    }  }  // if the cmode_a is RESET, clear the structure but don't   // necessarily delete memory  //      if (cmode_a == Integral::RESET) {    setLength(0);  }    // if the cmode_a is RELEASE or FREE, clear the structure and  // release memory.  //  else if ((cmode_a == Integral::RELEASE) || (cmode_a == Integral::FREE)) {    // free memory -- the setCapacity call will actually release it.    //    setCapacity(0);    length_d = 0;  }    // exit gracefully  //  return true;}//------------------------------------------------------------------------//// class-specific public methods://  get and set methods////------------------------------------------------------------------------// method: setLength// // arguments://  long length: (input) new length//  boolean preserve_values: (input) should we save the memory//   // return: a boolean value indicating status//// this method sets the length, or number of valid elements//template<class TObject>boolean PriorityQueue<TObject>::setLength(long length_a, boolean preserve_values_a) {  // check arguments  //   if (length_a < 0) {    return Error::handle(name(), L"setLength", Error::ARG, __FILE__, __LINE__);  }    // if new length is greater than capacity, call setCapacity  //  if (length_a > capacity_d) {    if (!setCapacity(length_a, preserve_values_a)) {      return Error::handle(name(), L"setLength", Error::NOMEM,			   __FILE__, __LINE__);    }  }  // set new length  //   length_d = length_a;      // exit gracefully  //   return true;}// method: setCapacity// // arguments://  long capacity: (input) new capacity//  boolean preserve_values: (input) should we save the memory//   // return: a boolean value indicating status//// this method sets the capacity, which is the maximum number of elements// this queue can hold.//template<class TObject>boolean PriorityQueue<TObject>::setCapacity(long capacity_a,				     boolean preserve_values_a) {    // capacity_a < 0: error  //   if (capacity_a < 0) {    return Error::handle(name(), L"setCapacity",			 Error::ARG, __FILE__, __LINE__);  }  // capacity_a = capacity_d: done  //  else if (capacity_a == capacity_d) {    return true;  }  // capacity_a == 0 (and length_d == 0): just delete memory  //  else if (capacity_a == 0) {        // delete the old memory    //    if (v_d != (TObject**)NULL) {      if (alloc_d == SYSTEM) {	for (long i=0; i < (long)length_d; i++) {	  if (v_d[i] != (TObject*)NULL) {	    delete v_d[i];	    v_d[i] = (TObject*)NULL;	  }	}      }      delete [] v_d;      v_d = (TObject**)NULL;    }  }    // capacity_a >= length_d: we will need to allocate memory and/or  // transfer data.  //  else {    // allocate a new chunk of memory    //    TObject** new_mem = new TObject*[capacity_a];    if (new_mem == (TObject**)NULL) {      return Error::handle(name(), L"setCapacity", Error::NOMEM,			   __FILE__, __LINE__);    }    // initialize the memory    //    for (long i=0; i < (long)capacity_a; i++) {      new_mem[i] = (TObject*)NULL;    }        // if there are valid elements and we need to preserve them    //    if (((long)length_d > 0) && preserve_values_a) {      for (long i = 0; i < (long)length_d; i++) {	new_mem[i] = accessByMode(v_d[i]);      }    }        // delete the old memory    //    if (v_d != (TObject**)NULL) {      if (alloc_d == SYSTEM) {	for (long i=0; i < (long)length_d; i++) {	  if (v_d[i] != (TObject*)NULL) {	    delete v_d[i];	    v_d[i] = (TObject*)NULL;	  }	}      }            delete [] v_d;      v_d = (TObject**)NULL;    }        // assign the pointer to the new memory    //    v_d = new_mem;  }    // set the new capacity  //  capacity_d = capacity_a;  // exit gracefully  //  return true;}//---------------------------------------------------------------------------//// class-specific public methods://  queue property methods////---------------------------------------------------------------------------// method: push// // arguments://  TObject* item: (input) item to be inserted//  COMPARE_FUNC comp_func: (input) priority queue comparison function//   // return: a boolean value indicating status//// this method inserts an item into the queue//template<class TObject>boolean PriorityQueue<TObject>::push(TObject* item_a,				     COMPARE_FUNC comp_func_a) {  // declare local variables  //  TObject* new_obj = (TObject*)NULL;  // mode: SYSTEM  //  make a copy of the element  //  if (alloc_d == SYSTEM) {    new_obj = new TObject(*item_a);  }  // mode: USER  //  make a copy of the pointer to the item  //  else {    new_obj = item_a;  }    // increase the size of the heap by one  //  setLength((long)length_d + 1);  // propagate the item up the heap until the heap properties are met  //  long i = (long)length_d - 1;  while ((i > 0) &&	 (comp_func_a(v_d[parent(i)], new_obj) == Integral::LESSER)) {    v_d[i] = v_d[parent(i)];    i = parent(i);  }  v_d[i] = new_obj;  // exit gracefully  //  return true;}// method: pop// // arguments://  TObject* item: (output) item to be removed//   // return: a boolean value indicating status//// this method removes the maximum item from the queue//template<class TObject>TObject* PriorityQueue<TObject>::pop(TObject* item_a) {  // declare local variables  //  TObject* ptr = (TObject*)NULL;    // when in SYSTEM mode the item passed in should not be  // null, if we are in USER mode the item should be null  //  if (((alloc_d == SYSTEM) && (item_a == (TObject*)NULL)) ||      ((alloc_d == USER) && (item_a != (TObject*)NULL))) {    Error::handle(name(), L"remove", ERR, __FILE__, __LINE__);    return (TObject*)NULL;  }    // check for heap size violations  //  if (!isEmpty()) {    // retrieve the maximum item form the heap    //    ptr = v_d[0];    // mode: SYSTEM    //    if (alloc_d == SYSTEM) {      // make a copy of the object      //      item_a->assign(*ptr);      // delete the reference to the object            //      delete ptr;    }        // mode: USER    //    else {            // assign the pointer to the item      //      item_a = ptr;    }        // remove the maximum item and reorganize the heap    //    v_d[0] = v_d[(long)length_d - 1];    setLength((long)length_d - 1);    heapify(0);        // return a pointer to the object (so that the return value can    // be compared)    //    return item_a;  }  // nothing in queue, return null  //  return (TObject*)NULL;  }// method: top// // arguments://  TObject* item: (output) item to be removed//   // return: a boolean value indicating status//// this method removes the maximum item from the queue//template<class TObject>const TObject* PriorityQueue<TObject>::top() const {  // check for heap size violations  //  if (isEmpty()) {    Error::handle(name(), L"top", Error::ARG, __FILE__, __LINE__);    return (TObject*)NULL;  }  // return the maximum item in the heap  //  return v_d[0];}// method: top// // arguments://  TObject* item: (output) item to be removed//   // return: a boolean value indicating status//// this method removes the maximum item from the queue//template<class TObject>TObject* PriorityQueue<TObject>::top() {  // check for heap size violations  //  if (isEmpty()) {    Error::handle(name(), L"top", Error::ARG, __FILE__, __LINE__);    return (TObject*)NULL;  }  // return the maximum item in the heap  //  return v_d[0];}//---------------------------------------------------------------------------//// heap manipulation methods////---------------------------------------------------------------------------// method: compare// // arguments://  TObject* item1: (input) first item to compare//  TObject* item2: (input) second item to compare//   // return: an enum indicating comparison status//// method compares the input items//template<class TObject>Integral::COMPARE PriorityQueue<TObject>::compare(TObject* item1_a,						  TObject* item2_a) {  // check if item1 is greater than item2  //  if (*item1_a > *item2_a) {    return Integral::GREATER;  }  // check if item1 is less than item2  //  if (*item1_a < *item2_a) {    return Integral::LESSER;  }  // if we made it this far then the item must be equal  //  return Integral::EQUAL;} // method: heapify// // arguments://  long index: (input) index at which o start the heapify process//  COMPARE_FUNC comp_func: (input) priority queue comparison function//   // return: a boolean value indicating status//// this method verifies that the underlying array obeys the heap property//template<class TObject>boolean PriorityQueue<TObject>::heapify(long index_a,					COMPARE_FUNC comp_func_a) {  // declare local variables  //  TObject* tmp = (TObject*)NULL;  // get the children of the index  //  long l = left(index_a);  long r = right(index_a);  // assume the current index is the largest  //  long largest = index_a;  // check if the left child is larger  //  if ((l < (long)length_d) &&      (comp_func_a(v_d[l], v_d[index_a]) == Integral::GREATER)) {    largest = l;  }  // check if the right child is larger  //  if ((r < (long)length_d) &&      (comp_func_a(v_d[r], v_d[largest]) == Integral::GREATER)) {    largest = r;  }  // check if the heap property is violated  //  if (largest != index_a) {    // exchange    //    tmp = v_d[largest];    v_d[largest] = v_d[index_a];    v_d[index_a] = tmp;    // recursively reorder the heap    //    heapify(largest);  }    // exit gracefully  //  return true;}// method: buildHeap// // arguments: none//   // return: a boolean value indicating status//// this method builds a heap out of the underlying array//template<class TObject>boolean PriorityQueue<TObject>::buildHeap() {  // build the heap using the heapify routine  //  long size = (long)length_d - 1;  for (long i=size/2; i >= 0; i--) {    heapify(i);  }    // exit gracefully  //  return true;}// method: heapSort// // arguments: none//   // return: a boolean value indicating status//// this method sorts the elements in the heap//template<class TObject>boolean PriorityQueue<TObject>::heapSort() {  // declare local variables  //  long size = (long)length_d;  TObject* tmp = (TObject*)NULL;  // construct the heap out of the existing elements  //  buildHeap();  // loop over the elements and sort them as we move along  //  for (long i=(long)length_d - 1; i >= 1; i--) {    // exchange    //    tmp = v_d[0];    v_d[0] = v_d[i];    v_d[i] = tmp;    // reduce the size of the heap and reorder    //    setLength((long)length_d - 1);    heapify(0);  }  // reset the length after we are done  //  setLength(size);    // exit gracefully  //  return true;}// method: accessByMode// // arguments://   TObject* item: (input) input item to access by mode//   // return: input item accessed by mode//// this method accesses the input element via the access mode//template<class TObject>TObject* PriorityQueue<TObject>::accessByMode(TObject* item_a) {  // declare local variables  //  TObject* new_obj = (TObject*)NULL;  // access by mode  //  if (alloc_d == USER) {    new_obj = item_a;  }  else {    new_obj = new TObject(*item_a);  }  // return the item by mode  //  return new_obj;}// end of include file//#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩国产综合久久 | 在线不卡欧美精品一区二区三区| 经典三级视频一区| 奇米在线7777在线精品| 日韩激情视频在线观看| 日韩国产精品久久久久久亚洲| 午夜精品123| 日韩av一区二区在线影视| 日本大胆欧美人术艺术动态| 久久99国产乱子伦精品免费| 国产尤物一区二区| 波多野结衣中文字幕一区| 91日韩一区二区三区| 欧美影视一区在线| 51精品视频一区二区三区| 日韩精品专区在线影院重磅| 亚洲精品一区二区三区影院 | 日韩免费观看高清完整版| 26uuu久久天堂性欧美| 日本一区二区三区电影| 自拍偷拍国产亚洲| 五月天欧美精品| 理论电影国产精品| 成av人片一区二区| 欧美日韩国产影片| 日韩精品影音先锋| **欧美大码日韩| 青青草97国产精品免费观看| 国产成人亚洲精品青草天美| 欧美在线免费观看视频| 久久久久久一二三区| 日韩理论片网站| 理论片日本一区| 99天天综合性| 精品福利一区二区三区免费视频| 国产精品免费aⅴ片在线观看| 亚洲福利视频一区二区| 国产精品123| 欧美久久久久久蜜桃| 日韩毛片精品高清免费| 久热成人在线视频| 在线视频国内一区二区| 久久久久国产精品麻豆| 日韩—二三区免费观看av| 91在线观看一区二区| 欧美不卡视频一区| 一区2区3区在线看| 国产另类ts人妖一区二区| 欧美午夜免费电影| 亚洲国产成人午夜在线一区| 麻豆精品在线观看| 欧美日韩美少妇| 一区在线播放视频| 国产精品一区二区三区乱码| 91精品国产麻豆| 亚洲一级不卡视频| 成人免费三级在线| 久久女同精品一区二区| 喷水一区二区三区| 欧美日韩精品免费观看视频| 亚洲蜜臀av乱码久久精品蜜桃| 国产一二三精品| 26uuu国产在线精品一区二区| 丝袜美腿亚洲一区| 欧美狂野另类xxxxoooo| 亚洲午夜在线电影| 在线国产电影不卡| 亚洲精品欧美专区| 欧美在线综合视频| 亚洲国产综合在线| 欧美色图在线观看| 午夜av区久久| 51午夜精品国产| 美腿丝袜亚洲综合| 欧美一级夜夜爽| 精品一区二区在线播放| 2014亚洲片线观看视频免费| 国内不卡的二区三区中文字幕| 日韩午夜激情电影| 精品在线免费视频| 亚洲精品一区在线观看| 国产成人鲁色资源国产91色综| 国产欧美一区二区三区在线看蜜臀 | 亚洲一卡二卡三卡四卡无卡久久| 色诱视频网站一区| 亚洲成人7777| 精品国产成人在线影院 | 午夜欧美一区二区三区在线播放| 欧美三级日韩三级| 欧美aaaaa成人免费观看视频| 精品国产一二三| 成人av在线影院| 亚洲一二三级电影| 精品免费99久久| 成人免费高清视频| 一区二区三区在线视频观看 | 欧美国产精品v| 在线精品视频一区二区三四| 日韩不卡在线观看日韩不卡视频| 久久久久国产精品厨房| 91视视频在线观看入口直接观看www | 亚洲欧美乱综合| 欧美精品乱人伦久久久久久| 九九精品视频在线看| 中文字幕亚洲成人| 欧美剧在线免费观看网站| 国产一二三精品| 亚洲午夜电影在线观看| 久久综合网色—综合色88| 色综合天天天天做夜夜夜夜做| 亚洲电影一区二区| 国产欧美日产一区| 日韩免费在线观看| 亚洲成人在线网站| 久久久精品中文字幕麻豆发布| 91丝袜高跟美女视频| 蜜桃91丨九色丨蝌蚪91桃色| 中文字幕视频一区| 日韩一级二级三级精品视频| 99国内精品久久| 精久久久久久久久久久| 亚洲综合成人在线| 久久精品视频网| 精品视频一区三区九区| 丰满放荡岳乱妇91ww| 日韩成人免费电影| 亚洲区小说区图片区qvod| 国产午夜一区二区三区| 欧美不卡一二三| 欧美乱熟臀69xxxxxx| 色一区在线观看| 成人的网站免费观看| 国产一区二区视频在线播放| 天堂va蜜桃一区二区三区| 亚洲视频在线观看三级| 久久久国产综合精品女国产盗摄| 欧美成人女星排行榜| 这里只有精品免费| 色屁屁一区二区| 99久久精品国产麻豆演员表| 国产·精品毛片| 国产成人免费av在线| 国产高清视频一区| 国产成人亚洲综合a∨猫咪| 国产在线麻豆精品观看| 麻豆免费看一区二区三区| 麻豆一区二区在线| 男女男精品视频网| 美女精品一区二区| 精品一区二区三区视频在线观看| 免费成人av资源网| 美腿丝袜亚洲一区| 国产在线精品一区二区三区不卡| 国内精品久久久久影院色| 国内精品在线播放| 成人黄色国产精品网站大全在线免费观看| 精品亚洲国内自在自线福利| 国产一区二区精品在线观看| 韩国理伦片一区二区三区在线播放 | 国产一区二区看久久| 国产美女精品在线| 成人性生交大片免费看中文 | 免费国产亚洲视频| 精品一区二区三区视频在线观看| 狠狠色伊人亚洲综合成人| 国产91丝袜在线播放0| 不卡av免费在线观看| 欧美影视一区二区三区| 欧美一区二区三区在线| 久久精品一区二区三区不卡| 国产精品久久久久久久久晋中| 亚洲欧美一区二区三区孕妇| 亚洲影视在线播放| 日本伊人午夜精品| 国产呦萝稀缺另类资源| 一本一道综合狠狠老| 欧美日韩1234| 国产网站一区二区| 亚洲男人的天堂一区二区| 亚洲国产视频网站| 麻豆成人免费电影| 99久久99久久综合| 日韩三级视频在线看| 中文字幕成人网| 日韩福利电影在线观看| 99久久久久久| 日韩一级片在线播放| 亚洲国产精品精华液2区45| 午夜亚洲国产au精品一区二区| 狠狠v欧美v日韩v亚洲ⅴ| 91农村精品一区二区在线| 欧美一区二区免费| 中文字幕亚洲一区二区va在线| 日本v片在线高清不卡在线观看| 成人黄色综合网站| 精品剧情在线观看| 亚洲国产精品久久人人爱蜜臀| 国产成人高清视频| 日韩一区二区三区在线视频| 亚洲激情在线激情|