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

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

?? symtab.c

?? apriori算法是數據挖掘的經典算法之1,其基于關聯規則的思想.這是我的第2個收藏算法
?? C
?? 第 1 頁 / 共 2 頁
字號:
/*----------------------------------------------------------------------  File    : symtab.c  Contents: symbol table management  Author  : Christian Borgelt  History : 22.10.1995 file created            30.10.1995 functions made independent of symbol data            26.11.1995 symbol types and visibility levels added            04.01.1996 st_clear added            27.02.1996 st_insert modified            28.06.1996 dynamic bucket vector enlargement added            04.07.1996 bug in bucket reorganization removed            01.04.1997 functions st_clear and st_remove combined            29.07.1997 minor improvements            05.08.1997 minor improvements            16.11.1997 some comments improved            06.02.1998 default table sizes changed            31.05.1998 list of all symbols removed            20.06.1998 deletion function moved to st_create            14.07.1998 minor improvements            01.09.1998 bug in function _sort removed, assertions added            25.09.1998 hash function improved            28.09.1998 types ULONG and CCHAR removed, st_stats added            04.02.1999 long int changed to int            10.11.1999 name/identifier map management added----------------------------------------------------------------------*/#include <stdio.h>#include <stdlib.h>#include <string.h>#include <limits.h>#include <assert.h>#include "symtab.h"#ifdef NIMAPFN#include "vecops.h"#endif#ifdef STORAGE#include "storage.h"#endif/*----------------------------------------------------------------------  Preprocessor Definitions----------------------------------------------------------------------*/#define DFLT_INIT     1023      /* default initial hash table size */#if (INT_MAX > 32767)#define DFLT_MAX   1048575      /* default maximal hash table size */#else#define DFLT_MAX     16383      /* default maximal hash table size */#endif#define BLKSIZE        256      /* block size for identifier vector *//*----------------------------------------------------------------------  Default Hash Function----------------------------------------------------------------------*/static unsigned _hdflt (const char *name, int type){                               /* --- default hash function */  register unsigned h = type;   /* hash value */  while (*name) h ^= (h << 3) ^ (unsigned)(*name++);  return h;                     /* compute hash value */}  /* _hdflt() *//*----------------------------------------------------------------------  Auxiliary Functions----------------------------------------------------------------------*/static void _delsym (SYMTAB *tab){                               /* --- delete all symbols */  int i;                        /* loop variable */  STE *ste, *tmp;               /* to traverse the symbol list */  for (i = tab->size; --i >= 0; ) {  /* traverse bucket vector */    ste = tab->bvec[i];         /* get the next bucket list, */    tab->bvec[i] = NULL;        /* clear the bucket vector entry, */    while (ste) {               /* and traverse the bucket list */      tmp = ste;                /* note the symbol to delete */      ste = ste->succ;          /* and get the next symbol */      if (tab->delfn) tab->delfn(tmp +1);      free(tmp);                /* if a deletion function is given, */    }                           /* call it and then deallocate */  }                             /* the symbol table element */}  /* _delsym() *//*--------------------------------------------------------------------*/static STE** _merge (STE *in[], int cnt[], STE **out){                               /* --- merge two lists into one */  int k;                        /* index of input list */  do {                          /* compare and merge loop */    k = (in[0]->level > in[1]->level) ? 0 : 1;    *out  = in[k];              /* append the element on the higher */    out   = &(*out)->succ;      /* level to the output list and */    in[k] = *out;               /* remove it from the input list */  } while (--cnt[k] > 0);       /* while both lists are not empty */  *out = in[k ^= 1];            /* append remaining elements */  while (--cnt[k] >= 0)         /* while not at the end of the list */    out = &(*out)->succ;        /* go to the successor element */  in[k] = *out;                 /* set new start of the input list */  *out  = NULL;                 /* terminate the output list and */  return out;                   /* return new end of the output list */}  /* _merge() *//*--------------------------------------------------------------------*/static STE* _sort (STE *list){                               /* --- sort a hash bucket list */  STE *ste;                     /* to traverse the list, buffer */  STE *in[2], *out[2];          /* input and output lists */  STE **end[2];                 /* ends of output lists */  int cnt[2];                   /* number of elements to merge */  int run;                      /* run length in input lists */  int rem;                      /* elements in remainder collection */  int oid;                      /* index of output list */  if (!list) return list;       /* empty lists need not to be sorted */  oid = 0; out[0] = list;       /* traverse list elements */  for (ste = list->succ; ste; ste = ste->succ)    if ((oid ^= 1) == 0) list = list->succ;  out[1] = list->succ;          /* split list into two equal parts */  list   = list->succ = NULL;   /* initialize remainder collection */  run    = 1; rem = 0;          /* and run length */  while (out[1]) {              /* while there are two lists */    in [0] = out[0]; in [1] = out[1];  /* move output list to input */    end[0] = out;    end[1] = out+1;   /* reinitialize end pointers */    out[1] = NULL;   oid    = 0;       /* start with 1st output list */    do {                        /* merge loop */      cnt[0]   = cnt[1] = run;  /* merge run elements from the */      end[oid] = _merge(in, cnt, end[oid]);     /* input lists */      oid ^= 1;                 /* toggle index of output list */    } while (in[1]);            /* while both lists are not empty */    if (in[0]) {                /* if there is one input list left */      if (!list)                /* if there is no rem. collection, */        list = in[0];           /* just note the rem. input list */      else {                    /* if there is a rem. collection, */        cnt[0] = run; cnt[1] = rem; in[1] = list;        _merge(in, cnt, &list); /* merge it and the input list to */      }                         /* get the new renmainder collection */      rem += run;               /* there are now run more elements */    }                           /* in the remainder collection */    run <<= 1;                  /* double run length */  }  /* while (out[1]) .. */  if (rem > 0) {                /* if there is a rem. collection */    in[0] = out[0]; cnt[0] = run;    in[1] = list;   cnt[1] = rem;    _merge(in, cnt, out);       /* merge it to the output list */  }                             /* and store the result in out[0] */  return out[0];                /* return the sorted list */}  /* _sort() *//*--------------------------------------------------------------------*/static void _reorg (SYMTAB *tab){                               /* --- reorganize a hash table */  int i;                        /* loop variable */  int size;                     /* new bucket vector size */  STE **p;                      /* new bucket vector, buffer */  STE *ste;                     /* to traverse symbol table elements */  STE *list = NULL;             /* list of all symbols */  size = (tab->size << 1) +1;   /* calculate new vector size */  if (size > tab->max)          /* if new size exceeds maximum, */    size = tab->max;            /* set the maximal size */  for (p = &list, i = tab->size; --i >= 0; ) {    *p = tab->bvec[i];          /* traverse the bucket vector and */    while (*p) p = &(*p)->succ; /* link all bucket lists together */  }                             /* (collect symbols) */  p = (STE**)realloc(tab->bvec, size *sizeof(STE*));  if (!p) return;               /* enlarge bucket vector */  tab->bvec = p;                /* set new bucket vector */  tab->size = size;             /* and its size */  for (p += i = size; --i >= 0; )    *--p = NULL;                /* clear the hash buckets */  while (list) {                /* traverse list of all symbols */    ste = list; list = list->succ;           /* get next symbol */    i   = tab->hash(ste->name, ste->type) %size;    ste->succ = tab->bvec[i];   /* compute the hash bucket index */    tab->bvec[i] = ste;         /* and insert the symbol at */  }                             /* the head of the bucket list */  for (i = size; --i >= 0; )    /* sort bucket lists according to */    tab->bvec[i] = _sort(tab->bvec[i]);   /* the visibility level */}  /* _reorg() *//*----------------------------------------------------------------------  Symbol Table Functions----------------------------------------------------------------------*/SYMTAB* st_create (int init, int max, HASHFN hash, SYMFN delfn){                               /* --- create a symbol table */  SYMTAB *tab;                  /* created symbol table */  if (init <= 0) init = DFLT_INIT;  /* check and adapt initial */  if (max  <= 0) max  = DFLT_MAX;   /* and maximal vector size */  tab = (SYMTAB*)malloc(sizeof(SYMTAB));  if (!tab) return NULL;        /* allocate symbol table body */  tab->bvec = (STE**)calloc(init, sizeof(STE*));  if (!tab->bvec) { free(tab); return NULL; }  tab->level = tab->cnt = 0;    /* allocate bucket vector */  tab->size  = init;            /* and initialize fields */  tab->max   = max;             /* of symbol table body */  tab->hash  = (hash) ? hash : _hdflt;  tab->delfn = delfn;  tab->vsz   = INT_MAX;  tab->ids   = NULL;  return tab;                   /* return created symbol table */}  /* st_create() *//*--------------------------------------------------------------------*/void st_delete (SYMTAB *tab){                               /* --- delete a symbol table */  assert(tab && tab->bvec);     /* check argument */  _delsym(tab);                 /* delete all symbols, */  free(tab->bvec);              /* the bucket vector, */  if (tab->ids) free(tab->ids); /* the identifier vector, */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
99国产精品视频免费观看| 精品污污网站免费看| 国产精品久久久久久妇女6080| 6080午夜不卡| 制服丝袜亚洲网站| 欧美日本一区二区三区四区 | 久久激情综合网| 日日噜噜夜夜狠狠视频欧美人| 亚洲国产精品久久艾草纯爱| 亚洲精品伦理在线| 亚洲国产成人av| 奇米精品一区二区三区在线观看 | 久久爱另类一区二区小说| 日本女优在线视频一区二区 | 国产福利91精品一区二区三区| 国产精品一区专区| 国产激情一区二区三区四区 | 亚洲精品国产a| 亚洲最新视频在线观看| 日韩黄色片在线观看| 久久精品理论片| 国产一区二区三区四区五区入口| 大尺度一区二区| 色八戒一区二区三区| 欧美日韩三级在线| 欧美精品一区二区三区高清aⅴ| 国产偷国产偷亚洲高清人白洁| 亚洲图片激情小说| 日韩精品91亚洲二区在线观看| 国产福利精品导航| 欧美日韩卡一卡二| 久久综合丝袜日本网| 欧美激情中文字幕一区二区| 亚洲三级在线播放| 久久99精品国产麻豆婷婷洗澡| 国产一区在线精品| 91福利在线导航| 久久久久久久久久久99999| 中文字幕亚洲视频| 免费观看一级特黄欧美大片| 成人毛片视频在线观看| 欧美日韩高清在线播放| 亚洲国产成人自拍| 丝袜a∨在线一区二区三区不卡| 国产福利一区二区三区视频在线 | 欧美一区二区网站| 亚洲图片你懂的| 狠狠网亚洲精品| 欧美天堂一区二区三区| 久久亚洲一级片| 亚洲成人第一页| 国产超碰在线一区| 欧美一区二区三区喷汁尤物| 国产精品久久久久精k8| 美女诱惑一区二区| 欧美老女人第四色| 自拍偷在线精品自拍偷无码专区| 蜜桃av一区二区| 欧美日韩国产经典色站一区二区三区| 国产欧美精品一区aⅴ影院| 偷偷要91色婷婷| 99久久亚洲一区二区三区青草| 欧美成人精品二区三区99精品| 亚洲一区av在线| 色婷婷av一区二区三区gif | 中文字幕在线不卡国产视频| 激情综合五月婷婷| 日韩欧美三级在线| 五月天欧美精品| 欧美视频一区二区三区在线观看| 国产精品区一区二区三| 激情成人午夜视频| 日韩欧美一区在线观看| 日本在线不卡一区| 欧美一区二区三区四区高清| 亚洲国产美女搞黄色| 色哟哟在线观看一区二区三区| 国产精品初高中害羞小美女文| 国产suv一区二区三区88区| 欧美草草影院在线视频| 麻豆国产91在线播放| 欧美一区二区不卡视频| 青青草成人在线观看| 欧美精品亚洲二区| 免费精品99久久国产综合精品| 777a∨成人精品桃花网| 日韩二区三区四区| 日韩午夜激情电影| 韩国一区二区三区| 欧美国产日韩精品免费观看| 成人高清视频在线观看| 综合久久久久久| 色狠狠色噜噜噜综合网| 日韩精品欧美成人高清一区二区| 欧美岛国在线观看| 国产精品88av| 亚洲欧美偷拍另类a∨色屁股| 欧美伊人久久大香线蕉综合69| 日韩综合小视频| 国产校园另类小说区| 91美女在线视频| 亚洲免费av高清| 日韩一区二区中文字幕| 成人激情免费视频| 亚洲综合精品自拍| 久久色.com| 在线国产亚洲欧美| 精品无人区卡一卡二卡三乱码免费卡| 日韩欧美国产综合| 一本大道久久a久久精品综合| 日韩精品成人一区二区在线| 国产女同互慰高潮91漫画| 欧美综合欧美视频| 国产一区二区三区观看| 一区二区三区在线观看网站| 欧美福利视频一区| 国产成人av一区二区三区在线观看| 亚洲午夜影视影院在线观看| 日韩精品中文字幕一区| 色天使色偷偷av一区二区| 狠狠色丁香婷婷综合久久片| 亚洲免费毛片网站| 久久久精品影视| 欧美日韩视频一区二区| 99久久精品情趣| 国内精品久久久久影院薰衣草| 亚洲黄色av一区| 久久亚洲影视婷婷| 日韩亚洲欧美综合| 在线免费观看成人短视频| 精品一区二区免费| 亚瑟在线精品视频| 国产精品黄色在线观看| 日韩精品中文字幕在线不卡尤物 | 午夜久久福利影院| 综合亚洲深深色噜噜狠狠网站| 欧美一区二区在线不卡| 99视频一区二区| 国产精品系列在线观看| 午夜精品久久久久久久| 亚洲男人的天堂在线观看| 国产亚洲自拍一区| 久久精品视频在线看| 日韩女优毛片在线| 欧美精品一二三四| 这里是久久伊人| 欧美精品在线观看播放| 在线成人av网站| 成人成人成人在线视频| 国产99久久精品| 激情久久五月天| 国产一区视频网站| 国产精品一卡二| 国产精品中文字幕一区二区三区| 免费欧美在线视频| 三级不卡在线观看| 日本伊人午夜精品| 男女激情视频一区| 久久国产精品99精品国产| 免费不卡在线观看| 久久精品免费看| 精品写真视频在线观看| 韩国成人在线视频| 国产成人综合网站| 波多野结衣亚洲| 99精品视频一区二区| 日本道在线观看一区二区| 欧美在线观看一区二区| 欧美日韩黄色影视| 精品国产人成亚洲区| 久久伊99综合婷婷久久伊| 国产日韩欧美麻豆| 一区二区三区蜜桃网| 午夜影院在线观看欧美| 美女视频黄 久久| 国产精品一二三| 91久久线看在观草草青青| 欧美一区二区三区视频免费播放| 精品粉嫩aⅴ一区二区三区四区| 欧美成人精品福利| 亚洲三级在线免费| 青青国产91久久久久久| 国产99久久久国产精品免费看 | 欧美日韩在线电影| 精品视频1区2区| 2019国产精品| 夜夜亚洲天天久久| 日本午夜精品视频在线观看| 国产一区91精品张津瑜| 成人免费毛片aaaaa**| 91国内精品野花午夜精品 | 国产精品乱人伦| 婷婷六月综合网| 国产美女视频91| 欧美日韩视频不卡| 中文字幕中文字幕一区| 日韩影院精彩在线| 91美女福利视频| 国产婷婷色一区二区三区| 一二三四社区欧美黄|