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

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

?? int.vec.cc

?? 對IEEE 802.11e里的分布式信道接入算法EDCA進行改進
?? CC
字號:
// This may look like C code, but it is really -*- C++ -*-/* Copyright (C) 1988 Free Software Foundation    written by Doug Lea (dl@rocky.oswego.edu)This file is part of the GNU C++ Library.  This library is freesoftware; you can redistribute it and/or modify it under the terms ofthe GNU Library General Public License as published by the FreeSoftware Foundation; either version 2 of the License, or (at youroption) any later version.  This library is distributed in the hopethat it will be useful, but WITHOUT ANY WARRANTY; without even theimplied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULARPURPOSE.  See the GNU Library General Public License for more details.You should have received a copy of the GNU Library General PublicLicense along with this library; if not, write to the Free SoftwareFoundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.*/#ifdef __GNUG__#pragma implementation#endif// #include <stream.h>#include <stdlib.h>#include "lib/builtin.h"#include "lib/int.Vec.h"// error handlingvoid default_intVec_error_handler(const char* msg){#if 0  cerr << "Fatal intVec error. " << msg << "\n";#else  // ns doesn't use streams  fprintf(stderr, "Fatal intVec error. %s\n", msg);#endif  exit(1);}one_arg_error_handler_t intVec_error_handler = default_intVec_error_handler;one_arg_error_handler_t set_intVec_error_handler(one_arg_error_handler_t f){  one_arg_error_handler_t old = intVec_error_handler;  intVec_error_handler = f;  return old;}void intVec::error(const char* msg){  (*intVec_error_handler)(msg);}void intVec::range_error(){  (*intVec_error_handler)("Index out of range.");}intVec::intVec(const intVec& v){  s = new int [len = v.len];  int* top = &(s[len]);  int* t = s;  const int* u = v.s;  while (t < top) *t++ = *u++;}intVec::intVec(int l, int  fill_value){  s = new int [len = l];  int* top = &(s[len]);  int* t = s;  while (t < top) *t++ = fill_value;}intVec& intVec::operator = (const intVec& v){  if (this != &v)  {    delete [] s;    s = new int [len = v.len];    int* top = &(s[len]);    int* t = s;    const int* u = v.s;    while (t < top) *t++ = *u++;  }  return *this;}void intVec::apply(intProcedure f){  int* top = &(s[len]);  int* t = s;  while (t < top) (*f)(*t++);}// can't just realloc since there may be need for constructors/destructorsvoid intVec::resize(int newl){  int* news = new int [newl];  int* p = news;  int minl = (len < newl)? len : newl;  int* top = &(s[minl]);  int* t = s;  while (t < top) *p++ = *t++;  delete [] s;  s = news;  len = newl;}intVec concat(intVec & a, intVec & b){  int newl = a.len + b.len;  int* news = new int [newl];  int* p = news;  int* top = &(a.s[a.len]);  int* t = a.s;  while (t < top) *p++ = *t++;  top = &(b.s[b.len]);  t = b.s;  while (t < top) *p++ = *t++;  return intVec(newl, news);}intVec combine(intCombiner f, intVec& a, intVec& b){  int newl = (a.len < b.len)? a.len : b.len;  int* news = new int [newl];  int* p = news;  int* top = &(a.s[newl]);  int* t = a.s;  int* u = b.s;  while (t < top) *p++ = (*f)(*t++, *u++);  return intVec(newl, news);}int intVec::reduce(intCombiner f, int  base){  int r = base;  int* top = &(s[len]);  int* t = s;  while (t < top) r = (*f)(r, *t++);  return r;}intVec reverse(intVec& a){  int* news = new int [a.len];  if (a.len != 0)  {    int* lo = news;    int* hi = &(news[a.len - 1]);    while (lo < hi)    {      int tmp = *lo;      *lo++ = *hi;      *hi-- = tmp;    }  }  return intVec(a.len, news);}void intVec::reverse(){  if (len != 0)  {    int* lo = s;    int* hi = &(s[len - 1]);    while (lo < hi)    {      int tmp = *lo;      *lo++ = *hi;      *hi-- = tmp;    }  }}int intVec::index(int  targ){  for (int i = 0; i < len; ++i) if (intEQ(targ, s[i])) return i;  return -1;}intVec map(intMapper f, intVec& a){  int* news = new int [a.len];  int* p = news;  int* top = &(a.s[a.len]);  int* t = a.s;  while(t < top) *p++ = (*f)(*t++);  return intVec(a.len, news);}int operator == (intVec& a, intVec& b){  if (a.len != b.len)    return 0;  int* top = &(a.s[a.len]);  int* t = a.s;  int* u = b.s;  while (t < top) if (!(intEQ(*t++, *u++))) return 0;  return 1;}void intVec::fill(int  val, int from, int n){  int to;  if (n < 0)    to = len - 1;  else    to = from + n - 1;  if ((unsigned)from > (unsigned)to)    range_error();  int* t = &(s[from]);  int* top = &(s[to]);  while (t <= top) *t++ = val;}intVec intVec::at(int from, int n){  int to;  if (n < 0)  {    n = len - from;    to = len - 1;  }  else    to = from + n - 1;  if ((unsigned)from > (unsigned)to)    range_error();  int* news = new int [n];  int* p = news;  int* t = &(s[from]);  int* top = &(s[to]);  while (t <= top) *p++ = *t++;  return intVec(n, news);}intVec merge(intVec & a, intVec & b, intComparator f){  int newl = a.len + b.len;  int* news = new int [newl];  int* p = news;  int* topa = &(a.s[a.len]);  int* as = a.s;  int* topb = &(b.s[b.len]);  int* bs = b.s;  for (;;)  {    if (as >= topa)    {      while (bs < topb) *p++ = *bs++;      break;    }    else if (bs >= topb)    {      while (as < topa) *p++ = *as++;      break;    }    else if ((*f)(*as, *bs) <= 0)      *p++ = *as++;    else      *p++ = *bs++;  }  return intVec(newl, news);}static int gsort(int*, int, intComparator); void intVec::sort (intComparator compar){  gsort(s, len, compar);}// An adaptation of Schmidt's new quicksortstatic inline void SWAP(int* A, int* B){  int tmp = *A; *A = *B; *B = tmp;}/* This should be replaced by a standard ANSI macro. */#define BYTES_PER_WORD 8#define BYTES_PER_LONG 4/* The next 4 #defines implement a very fast in-line stack abstraction. */#define STACK_SIZE (BYTES_PER_WORD * BYTES_PER_LONG)#define PUSH(LOW,HIGH) do {top->lo = LOW;top++->hi = HIGH;} while (0)#define POP(LOW,HIGH)  do {LOW = (--top)->lo;HIGH = top->hi;} while (0)#define STACK_NOT_EMPTY (stack < top)                /* Discontinue quicksort algorithm when partition gets below this size.   This particular magic number was chosen to work best on a Sun 4/260. */#define MAX_THRESH 4/* Order size using quicksort.  This implementation incorporates   four optimizations discussed in Sedgewick:      1. Non-recursive, using an explicit stack of pointer that      store the next array partition to sort.  To save time, this      maximum amount of space required to store an array of      MAX_INT is allocated on the stack.  Assuming a 32-bit integer,      this needs only 32 * sizeof (stack_node) == 136 bits.  Pretty      cheap, actually.   2. Chose the pivot element using a median-of-three decision tree.      This reduces the probability of selecting a bad pivot value and       eliminates certain extraneous comparisons.   3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving      insertion sort to order the MAX_THRESH items within each partition.        This is a big win, since insertion sort is faster for small, mostly      sorted array segements.      4. The larger of the two sub-partitions is always pushed onto the      stack first, with the algorithm then concentrating on the      smaller partition.  This *guarantees* no more than log (n)      stack size is needed! */      static int gsort (int *base_ptr, int total_elems, intComparator cmp){/* Stack node declarations used to store unfulfilled partition obligations. */  struct stack_node {  int *lo;  int *hi; };  int   pivot_buffer;  int   max_thresh   = MAX_THRESH;  if (total_elems > MAX_THRESH)    {      int       *lo = base_ptr;      int       *hi = lo + (total_elems - 1);      int       *left_ptr;      int       *right_ptr;      stack_node stack[STACK_SIZE]; /* Largest size needed for 32-bit int!!! */      stack_node *top = stack + 1;      while (STACK_NOT_EMPTY)        {          {            int *pivot = &pivot_buffer;            {              /* Select median value from among LO, MID, and HI. Rearrange                 LO and HI so the three values are sorted. This lowers the                  probability of picking a pathological pivot value and                  skips a comparison for both the LEFT_PTR and RIGHT_PTR. */              int *mid = lo + ((hi - lo) >> 1);              if ((*cmp) (*mid, *lo) < 0)                SWAP (mid, lo);              if ((*cmp) (*hi, *mid) < 0)              {                SWAP (mid, hi);                if ((*cmp) (*mid, *lo) < 0)                  SWAP (mid, lo);              }              *pivot = *mid;              pivot = &pivot_buffer;            }            left_ptr  = lo + 1;            right_ptr = hi - 1;             /* Here's the famous ``collapse the walls'' section of quicksort.                 Gotta like those tight inner loops!  They are the main reason                that this algorithm runs much faster than others. */            do               {                while ((*cmp) (*left_ptr, *pivot) < 0)                  left_ptr += 1;                while ((*cmp) (*pivot, *right_ptr) < 0)                  right_ptr -= 1;                if (left_ptr < right_ptr)                   {                    SWAP (left_ptr, right_ptr);                    left_ptr += 1;                    right_ptr -= 1;                  }                else if (left_ptr == right_ptr)                   {                    left_ptr += 1;                    right_ptr -= 1;                    break;                  }              }             while (left_ptr <= right_ptr);          }          /* Set up pointers for next iteration.  First determine whether             left and right partitions are below the threshold size. If so,              ignore one or both.  Otherwise, push the larger partition's             bounds on the stack and continue sorting the smaller one. */          if ((right_ptr - lo) <= max_thresh)            {              if ((hi - left_ptr) <= max_thresh) /* Ignore both small partitions. */                POP (lo, hi);               else              /* Ignore small left partition. */                  lo = left_ptr;            }          else if ((hi - left_ptr) <= max_thresh) /* Ignore small right partition. */            hi = right_ptr;          else if ((right_ptr - lo) > (hi - left_ptr)) /* Push larger left partition indices. */            {                                 PUSH (lo, right_ptr);              lo = left_ptr;            }          else                  /* Push larger right partition indices. */            {                                 PUSH (left_ptr, hi);              hi = right_ptr;            }        }    }  /* Once the BASE_PTR array is partially sorted by quicksort the rest     is completely sorted using insertion sort, since this is efficient      for partitions below MAX_THRESH size. BASE_PTR points to the beginning      of the array to sort, and END_PTR points at the very last element in     the array (*not* one beyond it!). */  {    int *end_ptr = base_ptr + 1 * (total_elems - 1);    int *run_ptr;    int *tmp_ptr = base_ptr;    int *thresh  = (end_ptr < (base_ptr + max_thresh))?       end_ptr : (base_ptr + max_thresh);    /* Find smallest element in first threshold and place it at the       array's beginning.  This is the smallest array element,       and the operation speeds up insertion sort's inner loop. */    for (run_ptr = tmp_ptr + 1; run_ptr <= thresh; run_ptr += 1)      if ((*cmp) (*run_ptr, *tmp_ptr) < 0)        tmp_ptr = run_ptr;    if (tmp_ptr != base_ptr)      SWAP (tmp_ptr, base_ptr);    /* Insertion sort, running from left-hand-side up to `right-hand-side.'        Pretty much straight out of the original GNU qsort routine. */    for (run_ptr = base_ptr + 1; (tmp_ptr = run_ptr += 1) <= end_ptr; )      {        while ((*cmp) (*run_ptr, *(tmp_ptr -= 1)) < 0)          ;        if ((tmp_ptr += 1) != run_ptr)          {            int *trav;            for (trav = run_ptr + 1; --trav >= run_ptr;)              {                int c = *trav;                int *hi, *lo;                for (hi = lo = trav; (lo -= 1) >= tmp_ptr; hi = lo)                  *hi = *lo;                *hi = c;              }          }      }  }  return 1;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲欧美偷拍另类a∨色屁股| 欧美一级久久久| 麻豆91精品91久久久的内涵| 一区二区三区在线观看动漫| 国产精品美日韩| 国产欧美精品一区二区三区四区 | 在线欧美日韩国产| 成人黄色电影在线| 99久久99久久精品国产片果冻| 国产很黄免费观看久久| 国产高清亚洲一区| 成人性视频免费网站| 风间由美一区二区三区在线观看| 成人免费看的视频| 95精品视频在线| 欧美日韩在线播| 欧美一区二区免费观在线| 日韩视频在线你懂得| 欧美tickle裸体挠脚心vk| 久久综合给合久久狠狠狠97色69| 久久久蜜桃精品| 中文字幕综合网| 日本不卡不码高清免费观看| 狠狠色狠狠色合久久伊人| 成人av中文字幕| 欧美福利视频一区| 久久蜜桃av一区精品变态类天堂 | 亚洲成av人影院| 狠狠色丁香婷婷综合久久片| 成人h动漫精品一区二区| 色婷婷国产精品| 精品欧美一区二区在线观看| 欧美经典三级视频一区二区三区| 亚洲欧美日韩在线不卡| 日本怡春院一区二区| 国产不卡视频在线观看| 精品视频1区2区3区| 亚洲精品在线观看网站| 亚洲精品视频在线观看网站| 久久国产三级精品| av不卡免费在线观看| 在线播放亚洲一区| 日韩一区日韩二区| 另类综合日韩欧美亚洲| 色综合久久久久久久| 久久伊人蜜桃av一区二区| 夜夜爽夜夜爽精品视频| 久久国产日韩欧美精品| 欧美三级韩国三级日本一级| 亚洲国产一区视频| 国产精品1024久久| 91精品国模一区二区三区| 亚洲欧洲av另类| 国产一区二区在线看| 欧美在线小视频| 中文字幕亚洲欧美在线不卡| 极品美女销魂一区二区三区| 欧美伊人久久久久久久久影院| 日本一二三四高清不卡| 国产在线视频不卡二| 制服丝袜一区二区三区| 亚洲自拍偷拍网站| 91最新地址在线播放| 国产欧美在线观看一区| 国内精品国产成人国产三级粉色 | 久久精品国产一区二区三区免费看| 99re这里都是精品| 国产精品少妇自拍| 国产精品一区二区免费不卡| 精品日韩99亚洲| 极品美女销魂一区二区三区免费 | 国产曰批免费观看久久久| 91精品欧美一区二区三区综合在 | 综合色天天鬼久久鬼色| 国产黄色91视频| 国产欧美日韩亚州综合| 国产夫妻精品视频| 久久综合九色综合欧美亚洲| 久久精品99国产国产精| 日韩欧美国产综合在线一区二区三区| 国产一区二区在线看| 久久久一区二区三区| 国产毛片精品视频| 国产蜜臀av在线一区二区三区| 国产剧情在线观看一区二区| 久久久电影一区二区三区| 国产精一区二区三区| 国产欧美一区二区精品忘忧草| 国产成人av电影在线观看| 国产女人18水真多18精品一级做| 成人h动漫精品| 一区二区三区欧美久久| 欧美精品乱码久久久久久| 日韩一区精品视频| 久久综合九色综合欧美亚洲| 成人av资源站| 亚洲自拍与偷拍| 日韩欧美在线网站| 成人午夜精品一区二区三区| 亚洲男人的天堂网| 日韩欧美美女一区二区三区| 久久国产欧美日韩精品| 亚洲同性同志一二三专区| 欧美日韩在线电影| 久久黄色级2电影| 成人欧美一区二区三区白人| 欧美日韩一区视频| 国产精品主播直播| 亚洲精品成人少妇| 亚洲精品一区二区精华| 色婷婷av一区二区三区大白胸| 日韩中文欧美在线| 国产精品久久久久久久久快鸭| 欧美特级限制片免费在线观看| 免费人成网站在线观看欧美高清| 亚洲电影在线播放| 欧美v亚洲v综合ⅴ国产v| fc2成人免费人成在线观看播放| 天天色天天操综合| 国产农村妇女精品| 欧美一区二区三区视频在线| 成人18视频日本| 精品一区二区三区av| 亚洲国产综合91精品麻豆| 久久久一区二区三区捆绑**| 欧美色图第一页| k8久久久一区二区三区| 久久69国产一区二区蜜臀| 一区二区三区资源| 欧美国产精品劲爆| 久久在线观看免费| 欧美嫩在线观看| 欧美亚洲高清一区二区三区不卡| 成人一区在线看| 九九久久精品视频| 日本成人在线不卡视频| 亚洲激情六月丁香| 亚洲日穴在线视频| 国产精品免费久久| 欧美精彩视频一区二区三区| 欧美一区二区高清| 欧美久久久影院| 欧美这里有精品| 色先锋资源久久综合| 99久久久无码国产精品| 成人免费福利片| 风流少妇一区二区| 成人免费毛片a| 国产精品一二一区| 激情综合色丁香一区二区| 日本伊人色综合网| 丝袜亚洲精品中文字幕一区| 亚洲成人自拍一区| 午夜电影网一区| 日韩成人伦理电影在线观看| 日韩中文字幕一区二区三区| 偷拍亚洲欧洲综合| 日韩国产在线观看| 久久精品国产久精国产| 免费看日韩精品| 精油按摩中文字幕久久| 国内精品视频666| 成人一区在线看| 色噜噜狠狠成人中文综合| 色av成人天堂桃色av| 在线观看精品一区| 欧美一级视频精品观看| 日韩精品最新网址| 久久午夜电影网| 国产精品久久久久久福利一牛影视| 久久精品久久久精品美女| 国内外成人在线| 播五月开心婷婷综合| 在线亚洲一区二区| 欧美系列亚洲系列| 日韩欧美激情四射| 亚洲国产精品高清| 亚洲欧美区自拍先锋| 偷窥少妇高潮呻吟av久久免费| 狠狠狠色丁香婷婷综合久久五月| 国产高清久久久久| 91麻豆精东视频| 日韩一区二区三区视频| 欧美激情在线一区二区三区| 亚洲欧美国产毛片在线| 免费在线看一区| 99久久伊人网影院| 91精品午夜视频| 国产精品理论在线观看| 亚洲成人在线网站| 高清av一区二区| 欧美精选在线播放| 国产欧美一区二区三区在线看蜜臀 | 91日韩在线专区| 日韩精品中午字幕| 亚洲欧美区自拍先锋| 麻豆高清免费国产一区| 在线视频亚洲一区| 国产亚洲欧美日韩日本| 亚洲第一成年网|